<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Mobile Devices Support @begin -->
<meta name="referrer" content="always">
<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta name="referrer" content="always">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<title>我正在玩双十一扫货大作战，领取到了一个1111元红包</title>
<link href="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/css/base.min.css" rel="stylesheet" type="text/css" />
<link href="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/css/tdhx.min.css" rel="stylesheet" type="text/css" />
<link href="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/css/weui.min.css" rel="stylesheet" type="text/css" />
<style type="text/css" media="screen">
#resule-status-body .youraward{
    font-size: 0.6rem;
    line-height: 1.2rem;
    margin-top: 30%;
}
.hongbao-dec h1{
    font-weight: normal;font-size: 1rem;line-height: 1.7rem
}
.hongbao-dec p{
    line-height: .7rem;font-size: .6rem
}
.hongbao .zhushi{
    width: 100%;
    margin: 0 auto;
    position: absolute;
    top: 86%;
    font-size: .4rem;
    }
     @media screen and (min-width: 768px){
#resule-status-body .youraward{
    font-size: 0.6rem;
    line-height: 1.2rem;
    margin-top: 10%;
}
.hongbao-dec h1{
    font-weight: normal;
    font-size: .8rem;
    line-height: 1.1rem;
}
.hongbao-dec p{
    line-height: .7rem;font-size: .5rem
}
.hongbao .zhushi{
    width: 100%;
    margin: 0 auto;
    position: absolute;
    top: 86%;
    font-size: .4rem;
    }
         
    }
</style>

<script type='text/javascript'>
var fromCanal = '-1';

    var g_serverTime = 1508292885290;
    var g_timeDeviation = g_serverTime - new Date().getTime(); //服务器时间与系统时间偏差
    var g_rem = 20;
    (function(win){
        var orientationX = false; //是否横屏进来
        if(win.orientation==90||win.orientation==-90){
            orientationX = true;
        }
        var docEl = win.document.documentElement,tid;
        function refreshRem1(){
            g_rem = docEl.getBoundingClientRect().width/16;
            !g_rem && (g_rem = 20);
            docEl.style.fontSize = g_rem + 'px';
        }
        function refreshRem2(){
            g_rem = docEl.getBoundingClientRect().width/16;
            if(!g_rem){
                return refreshRem1();
            }
            var width = docEl.getBoundingClientRect().width;
            var d = win.document.createElement('div');
            d.style.width = '1rem';
            d.style.display = "none";
            docEl.firstElementChild.appendChild(d);
            var defaultFontSize = parseFloat(window.getComputedStyle(d, null).getPropertyValue('width'));
            docEl.firstElementChild.removeChild(d);
            docEl.style.fontSize = (g_rem/defaultFontSize)*100 + '%';
        }
        var refreshRem = /HUAWEI TIT-TL00/i.test(navigator.userAgent) ? refreshRem2 : refreshRem1;
        try{
            win.addEventListener("orientationchange", function() {//触发手机横屏竖屏事件
                if(orientationX){
                    location.reload();
                }
            }, false);
        }catch(e){}
        win.addEventListener('pageshow', function(e) {
            if (e.persisted) {
                clearTimeout(tid);
                tid = setTimeout(refreshRem, 100);
            }
        }, false);
        refreshRem();
    })(window);
    
    function loadGamePreAssets(){}
</script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>


<script charset="utf-8" src="https://map.qq.com/api/js.exp&libraries=geometry"></script>



</head>
<body class="gameTpl_-1">


<!-- loading页面 -->
<div id="preloadPage" class="bg">
    
    <canvas id="preloadCanvas"></canvas>
    <img id="preloadImg" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/logo.png" style="position:absolute;top:-20rem;opacity:0;">
    
    <div class="info"><span id="loadPercent">0</span>%</div>
    <div id="userPreload" data-src="http://7020498.h40.faiusr.com/4/Y23zEj0iRzazUD3lFmblVDMjBjMzYGO.png"></div>
</div>

<!-- 广告页 -->
<div id="advertising" class="bgfix editTarget-advertising hideImp">
    <div class="skipTips"><span class="seconds">3</span>秒跳过</div>
</div>
    <div class="ajaxLoadBg">
        <div class="ajaxLoadBar "></div>
    </div>
    <div class="body">      
        <div class="home">
            <div id="homeBgBox">
                <img id="homeBg" src="http://7020498.h40.faiusr.com/2/114/ACgIABACGAAg2YiyvwUo8pS2RDCABTjADA.jpg"/> 
            </div>  
            <div class="gameInfoBox">
                <div class="titleImg imgContainer absCenter">
                    <img id="titleImg" class="slaveImg abs" src="http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgkImyvwUogpuh6QMwvAQ4gAI.png" style="width:15.45rem;height:6.9rem;top:0.05rem;left:0.3rem;"/>
                </div>
                    
            </div>  
            

    <div id='joinNumLine' class='joinNumLine absCenter' style='top:17.8rem;left:3.25rem;color:rgb(15, 103, 255);font-size:0.7rem; text-shadow:rgb(255, 255, 255) -1px -1px 0px, rgb(255, 255, 255) 0px -1px 0px, rgb(255, 255, 255) 1px -1px 0px, rgb(255, 255, 255) 1px 0px 0px, rgb(255, 255, 255) 1px 1px 0px, rgb(255, 255, 255) 0px 1px 0px, rgb(255, 255, 255) -1px 1px 0px, rgb(255, 255, 255) -1px 0px 0px;'>
    已有 <span id='joinNum' class="specil" style="color:rgb(15, 103, 255);font-size:0.7rem;text-shadow:rgb(255, 255, 255) -1px -1px 0px, rgb(255, 255, 255) 0px -1px 0px, rgb(255, 255, 255) 1px -1px 0px, rgb(255, 255, 255) 1px 0px 0px, rgb(255, 255, 255) 1px 1px 0px, rgb(255, 255, 255) 0px 1px 0px, rgb(255, 255, 255) -1px 1px 0px, rgb(255, 255, 255) -1px 0px 0px;">23658</span> 人完成游戏后获得红包</div>


<div id="playInfo" class="abs editTarget-playInfo hide" style="width:9rem;text-align:center;">
    <div class="dayPlayHint">您今天还有 <span id="count" class="specil todayPlayCount"></span> 次参与机会</div>
    <div class="totalPlayHint">您还有 <span class="totalPlayCount specil"></span> 次参与机会</div>
    <div class="dayPlayHint4Total">今天有 <span class="count specil todayPlayCount"></span> 次</div>
</div>  
            <div id="startBtn" class="startBtn imgContainer absCenter" style="top:0rem;">
                <img id="startBtnImg" class="slaveImg abs" src="http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAg6IiyvwUog6X65wcwsgI4fA.png" style="width:8.3rem;height:3.3rem;top:20.45rem;left:3.7rem;"/>
            </div>          
        </div>
        <div class="gameBox hide gameBgBox">
            <div id="gameBgBox">
                <img id="gameBg" src="http://7020498.h40.faiusr.com/2/114/ACgIABACGAAg5IqyvwUogPqHiQIwgAU4wAw.jpg" style="width:100%;height:auto;"/>    
            </div>
            
<div id="gameTopBar" class="gameTopBar" style="color:rgb(255, 62, 7);background-color:rgba(255, 255, 255, 0)">
    <div class="userInfoBox">
    <!--    <div  class="userImgBox" style="border-color:rgba(255, 255, 255, 0.498039)"><img src="http://wx.qlogo.cn/mmopen/vi_32/S0mDvTpQxAemDgxCF2hlJTBhWwDlJd2nZhxb5ia7wqDZnB8RgCYsut6djiaNbj2Jy1FCnbW3zmmz4QdzgC5rBicsg/0" class="userImg" /></div> -->
                    
            <div id="grade" class="grade">0</div>
            
    </div>
    <div class="timeBox">
        时间<br><span class="time">0</span>
    </div>
</div>  
            <div class="timeUpImg hide"></div>
            <div id="gamePlayPanel" class="gamePlayPanel">
                
                <canvas id="canvas" >你的浏览器不支持canvas，请换个牛逼点的浏览器，谢谢</canvas>
            </div>
        </div>
        
<div id="spxdPage"></div>
<div id='_hdOpenIdDiv' class='hide'>oI_3MwcBSLmaxopJR2fbLpM-75Pc</div><!-- 存放openId的节点 -->
<div id="pageMusic" style="position:absolute;top:0;height:0;"></div>
<!-- 活动规则，排行榜，我的奖品的弹出层 -->

<div class="ruleImg imgContainer absCenter" _mouseIn="0" onclick="11showRule(isAnimation=false);" >
    <img id="ruleImg" class="slaveImg abs notNeedFatherChage" src="http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgyoiyvwUopPXj4AEweDh4.png" style="width:3rem;height:3rem;top:0.15rem;left:12.85rem;"/>
    <div id="ruleImg" class="slaveImg abs notNeedFatherChage outSpecialDivAutoFit" style='width:3rem;height:3rem;top:0.15rem;left:12.85rem;'></div>
</div>





<!-- 活动锦囊弹出层 -->
<!-- <div id="activityKit" class="poupMain bg hide">
    <div class="arrow" id="arrow"></div>
    <div id="tip_txt">
        <p>提示</p>
        <p style="margin-top: 0.25rem">点击锦囊即可查看活动规则、排行榜、奖品等信息。</p>
    </div>
</div> -->

<!-- 兑奖联系方式弹出层 -->
<div id="awardUserInfoBg" class="hide" style="position:fixed; top:0; left: 0; bottom: 0; right: 0;overflow:hidden;"></div>
<!-- 验证二维码的弹出层 -->
<div id="validteBoxerBg" class="hide" style="position:fixed; top:0; left: 0; bottom: 0; right: 0;overflow: hidden;"></div>

<!--奖品详情弹出层 -->
<div id="awardDetailBox" class="poupMain bg hide isAngular">
    <div id="awardDetailScrollBox">
        <div id="awardDeailBg" class="bgfix hide"></div>
        <div class="awardCloseIcon"></div>
        <div class="awardDetail">
            <div class="hostName" style="padding: 0.7rem 2.2rem 1rem 0.7rem;text-align: left;color:#fff;word-break: break-word"></div>
            <div class="awardName"></div>
            <div class="awardSubTitle"></div>
            <div class="awardCodeTime codeTimeFixedRange"><em>使用期限</em>：<span class="codeBgTime"></span> - <span class="codeEndTime"></span></div>
            <div class="codeTimeFixedTerm hide">中奖后<span class="codeBgTime"></span>天生效，有效天数<span class="codeEndTime"></span>天</div>
            <div id="awardCollectionBtn" ontouchend = "HdGame.favorite();">收藏优惠券</div>
            <div class="awardDetailWarp"></div>
        </div>
        <div class="codeImgBox">
            <div id="codeStatusBox" class="hide" style="padding-top:1.25rem;color:#777">
                <div id="codeStatusBtn"></div>
                <div id="codeStatusInfo">商家已将该兑奖码设置为作废<br>详情请联系商家</div>
                <div id="codeStatusTips" class="hide"><em style="font-style: normal;">请先<span class="giftNameA">兑奖券</span>，<span class="targetDateMin">1</span>天后可用</em></div>
            </div>
            <div id="codeDetailInfoBox">
                <!--兑奖二维码弹出层-->
                <!--
                <div id="awardCodeLayer" class="homePoupMask hide">
                    <div id="awardCodeDetail">
                        <div class='codeLine' style="margin-top:0.4rem;">请联系核销员扫码核销</div>
                        <img class="codeImg"/>
                        <div class='codeLine' style="padding-top: 0.8rem;"><span class="code selectText"></span></div>
                        <div class="codeOptInfo"></div>
                    </div>
                </div>
                -->
                <img class="codeImg"/>
                <div class='codeLine'><span id="codeName">优惠码</span>：<span style=" max-width: 8.7rem;word-wrap: break-word;display: inline-block; vertical-align: middle;"class="code selectText"></span><span class="copy">复制券码</span></div>
                <div class="codeOptInfo"></div>
            </div>  
        </div>
        <div class="awardBtnList">
            
            <div style="height:0.4rem;"></div>
            <!--兑奖券详情弹出层 -->
            <div id="ticketDetailBox">
                <p class="ticketitle"><span class="text">兑奖券详情</span></p>
                <div class="ticketInfo">
                    <div class="itemList dateLine codeTimeFixedRange">
                        <div class="title">有效日期</div>
                        <div class="box">
                            <span class="beginTime">2016.03.03</span>至<span class="endTime">2017.03.03</span>
                        </div>
                    </div>
                    <div class="itemList dateLine codeTimeFixedTerm hide">
                        <div class="title">有效日期</div>
                        <div class="box">
                            中奖后<span class="codeBgTime"></span>天生效，有效天数<span class="codeEndTime"></span>天
                        </div>
                    </div>
                    <div class="itemList timelimitLine">
                        <div class="title">可用时段</div>
                        <div class="box">
                            <div class="timelimit">周一至周日</div>
                        </div>
                    </div>
                    <div class="itemList addressLine">
                        <div class="title titleAdress">兑奖地址</div>
                        <div class="box">
                            <div class="address">地址</div>
                        </div>
                    </div>
                    <div class="itemList noticeLine">
                        <div class="title titleNotice">兑奖须知</div>
                        <div class="box">
                            <div class="notice"><pre style="word-wrap: break-word;"></pre></div>
                        </div>
                    </div>
                </div>
            </div>
            
            
            <form action=""></form>
            <!-- 适用门店信息 -->
            <div id="useStoreBox" class="initHide">
                <div class="storeTitle">
                    <span class="text">适用门店</span><span class="storeNumText">（<span id="storeNum">5</span>个）</span>
                    <span class="moreBtn">更多</span>
                </div>
                <div class="storeInfoBox">
                    <div class="locationBtn" onclick="HdGame.openStoreLocation(this)"></div>
                    <div class="info">
                        <div class="storeNameBox"><span id="storeName"></span><span id="distance"></span></div>
                        <div class="storeAdress"></div>
                    </div>
                </div>
            </div>
            
            <div style="height:0.4rem;"></div>
            <a style="text-decoration:none;"><div class="servicePhone awardDetailBtn"><span class="text">客服电话</span><span class="phoneIcon"></span><span class="phoneText"></span></div></a>
            <a id="awardCusBtnInfo" href="###" style="text-decoration:none;"><div class="awardCusBtn awardDetailBtn weui-cell__bd" style="border-top:none;"><span class="text">自定义按钮（未开启）</span><span class="textDef hide">自定义按钮（未开启）</span><div class="cell__ft"></div></div></a>
            <div style="height:3.15rem;"></div>
        </div>
    </div>
    <div class="hide homePoupMask codeCopyDetailMask">
        <div class="codeCopyDetailPoup">
            长按以下文字复制券码<br>
            <div class="copyCode selectText"></div>
        </div>
    </div>
    <div class="hide bgfix codeDetailImgBox">
        <div class="absCenter imgBox">
            <img class="codeImg" style="width:9rem;height:9rem;"/>
        </div>
    </div>
    <div id="bottomCusBtnBox">
        <a id="bottomCusBtnInfo" href="###" style="text-decoration:none;"><div class="bottomCusBtn cusBtn" style="border-top:none;"><span class="text">立即兑奖</span><span class="textDef hide">立即兑奖</span></div></a>
        <a id="WxCusBtnInfo" href="###" style="text-decoration:none;" class="hide"><div class="awardCusBtn cusBtn" style="border-top:none;"><span class="text">自定义按钮（未开启）</span><span class="textDef hide">自定义按钮（未开启）</span><div class="cell__ft"></div></div></a>
    </div>
    <!--
    <div id="immediaAward" class="hide">
        <a style="text-decoration:none;"><div id="immediaAwardBtn" class="cusBtn" style="border-top:none;">立即兑奖</div></a>
    </div>
    -->
</div>
<!--门店列表弹出层 -->
<div id="storeListBox" class="bg hide">
    <div class="list"></div>
    <div class="refreshBtn hide">更新当前位置</div>
    <div class="closeBtn"></div>
</div>

<!--投诉页面弹出层 -->
<div id="informBox" class="bg hide">
    <div id="inform-reason-page">
        <!--应用微信样式-->
        <div class="weui-cells__title">请选择投诉原因</div>
        <div class="weui-cells weui-cells_radio"  id="inform-reason-box">
            <label class="weui-cell weui-check__label reasonItem" for="temptShare" _index="0">
                <div class="weui-cell__bd">
                    <p>诱导分享</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="radio1" id="temptShare">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label reasonItem" for="shamActive" _index="1">
                <div class="weui-cell__bd">
                    <p>虚假活动</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" name="radio1" class="weui-check" id="shamActive">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label reasonItem" for="political" _index="2">
                <div class="weui-cell__bd">
                    <p>政治敏感</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="radio1" id="political">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label reasonItem" for="eroticism" _index="3">
                <div class="weui-cell__bd">
                    <p>色情低俗</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" name="radio1" class="weui-check" id="eroticism">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label reasonItem" for="rumor" _index="4">
                <div class="weui-cell__bd">
                    <p>谣言</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="radio1" id="rumor">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label reasonItem" for="otherReason" _index="5">
                <div class="weui-cell__bd">
                    <p>其他（收集隐私信息等）</p>
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" name="radio1" class="weui-check" id="otherReason">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
        </div>
        <div id="cancel-inform-btn">取消</div>
        <div id="next-inform-btn" class="weui-btn weui-btn_primary hide">下一步</div>
        <div id="inform-poup-tip" class="hide">投诉成功</div>
    </div>
    <div id="inform-desc-page" style="display: none;">
        <div class="weui-cells__title">投诉描述</div>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell" id="inform-desc-box">
                <div class="weui-cell__bd">
                    <textarea class="weui-textarea" id="informDesc" placeholder="请输入文本" rows="4"></textarea>
                    <div class="weui-textarea-counter" id="informDesc-counter"><span>0</span>/50</div>
                </div>
            </div>
        </div>
        <div id="submit-inform-btn" class="weui-btn weui-btn_primary">提交</div>
    </div>
</div>
<div id="informResultBox" class="bg hide weui">
    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title">投诉成功</h2>
            <p class="weui-msg__desc">感谢你的参与，我们坚决反对色情、暴力、欺诈等违规信息，我们会认真处理你的投诉，维护绿色、健康的网络环境</p>
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a class="confirm-btn weui-btn weui-btn_primary">确定</a>
            </p>
        </div>
        <div class="weui-msg__extra-area">
            <div class="weui-footer">
            </div>
        </div>
    </div>
</div>
<!-- 右侧按钮 -->
<!-- <div class="homeBtnBox specialBottom">
    
    <div id="myAwardBtn" onclick="HdGame.changePoup(3,'',true)" style="display:none;"><span class='redDot'></span></div>
    <div id="informBtn" ontouchend="HdGame.changePoup(5,'',true)">
        <span>投诉</span>
    </div>
</div> -->
<!-- logo -->
<div id="logoImgBox" class="logoImgBox imgContainer absCenter hide" style="">
    <img id="logoImg" class="slaveImg abs" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/logo.png" style="width:2rem;height:2rem;top:3.5rem;left:0.75rem;"/>
</div>
<!-- 抽奖等待弹出层 -->
<div id="lots-wait-Box" style="display:none">
    <div id="lots-wait-img" class="editRelate-lotsPot"></div>
    <div id="lots-wait-hint">当前抽奖人数过多<br/>请稍等 <span id="lots-wait-hint-num">0</span> 秒</div>
</div>
<!-- 助力引导层 -->
<div id="helpGuideBox" style="display:none">
    
        
            <p>你今天已经没有抽奖机会了</br>分享给好友或群聊</p>
            <p style="margin-top:1.1rem;">
                今天将额外获得1次抽奖机会！<br/>（仅限当天首次分享）
            </p>
        
    
</div>
<!--
<div id="jv_dev_box" style="position:fixed;top:0;bottom:0;right:0;margin:auto;display:table;width:2rem;background-color:rgba(0,0,0,.3);color:#fff;">
    <div id="jv_share_btn" style="text-align:center;line-height:2;border-bottom:1px solid #fff;">share</div>
</div>
-->

<!-- 结果弹出层 -->
<div class="resuleBox   hide">
    <div id="resule-status-box" >
        
        <div id="resule-status-scrollWrap">
           <!--  <div class="resule-bgLight"></div> -->
            <div id="resule-status-bird"></div>
            <div id="resule-status-head">
              
                <div id="resule-status-ribbon" class="resule-status-ribbon"></div>
            </div>
            <div id="resule-status-body" style="width: 100%;
    height: auto;">

               <p class="youraward" style="">过关领取的红包礼品请在下方领取</p>
                 <div id="resule-status-playinfo" style="margin-top:0.6rem">
                     <img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/images/receive.png" alt="" style="width: 45%" id="lingqu" >
                </div>
                 <div id="resule-status-playinfo2" style="margin-top:0.6rem" >
                     <a href=""> <img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/images/again.png" alt="" style="width: 45%" id="again" ></a>
                </div>
                 <div id="resule-status-playinfo1" style="margin-top:0.6rem">
                     <a href="https://mp.weixin.qq.com/s/YGVdAFRTAJW_nBW-OPE8_w"><img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/images/Raiders.png" alt="" style="width: 45%" ></a>
                </div>
                
              
            </div>
         
        </div>
  
    </div>
    <!--分享到朋友圈-->
    <div id="share-status-box" style="position: absolute;top: 0;height: 100%;width:100%;background-color: rgba(0,0,0,.6);display: none" >
       <div class="share-top" style="width: 80%;float: right;    margin-top: 8%;">
         <img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/images/tishi_shang.png" alt="" style="width: 100%">
       </div>
       <div class="share-bottom" style="width: 100%;
    position: absolute;
    bottom: 5%;">
         <img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/images/tishi_xia.png" alt="" style="width: 35%;z-index:9999999" id="tishi_xia">
       </div> 
    </div>
    <!--红包领取成功-->
    <div id="success-box" style="position: absolute;top: 0;height: 100%;width:100%;background-color: rgba(0,0,0,.6);display: none" >
    <div class="hongbao" style="  width: 80%;
    margin: 0 auto;
    height: 53%;
   
    border-radius: 10px;
    position: fixed;
    text-align: center;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    margin: auto; background: url(images/hongbao.png)no-repeat center;background-size: contain;">
    
          <img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/images/close1.png" alt="" style="width: 10%; position: absolute; top: -10%; right: 0%;" id="close1">

   <div class="hongbao-dec" style="width: 100%;margin: 0 auto; position: absolute;top: 50%;">
        <h1 style="">恭喜您!</h1>
        <p style="">口令红包领取成功</p>
         <p style="">请打开手机淘宝查看</p>
    </div>
     <p style=" " class="zhushi">注:每天可多次领取多个红包</p>
    </div>
           

     
       
    </div>
    <script src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/js/clipboard.min.js"></script>
     <script type="text/javascript">

   window.onload = function(){
//分享到朋友圈
        document.querySelector("#lingqu").addEventListener("click",function(){
            var clipboard = new Clipboard('#lingqu', {
                text: function() {
                    return '颜值太高怎么办';
                }
            });
            var o = document.querySelector("#share-status-box")
            if(o.className == '') {
                o.style.display = 'block';
                o.className = 'active';
            }else{
                o.style.display = 'none';
                o.className = '';
            }
        },false);
//已分享到朋友圈
          document.querySelector("#share-status-box").addEventListener("click",function(){
            var o = document.querySelector("#share-status-box")
            if(o.className == '') {
                o.style.display = 'block';
                o.className = 'active';
            }else{
                o.style.display = 'none';
                o.className = '';
            }
        },false);

            document.querySelector("#share-status-box").addEventListener("click",function(){
            var o = document.querySelector("#success-box")
            if(o.className == '') {
                o.style.display = 'block';
                o.className = 'active';
            }else{
                o.style.display = 'none';
                o.className = '';
            }
        },false);
  
        document.querySelector("#tishi_xia").addEventListener("click",function(){
            var o = document.querySelector("#share-status-box")
            if(o.className == '') {
                o.style.display = 'block';
                o.className = 'active';
            }else{
                o.style.display = 'none';
                o.className = '';
            }
        },false);

        //    document.querySelector("#tishi_xia").addEventListener("click",function(){
        //     var o = document.querySelector("#success-box")
        //     if(o.className == '') {
        //         o.style.display = 'block';
        //         o.className = 'active';
        //     }else{
        //         o.style.display = 'none';
        //         o.className = '';
        //     }
        // },false);

//在玩一次
         document.querySelector("#again").addEventListener("click",function(){
            var o = document.querySelector("#resuleBox")
            if(o.className == '') {
                o.style.display = 'block';
                o.className = 'active';
            }else{
                o.style.display = 'none';
                o.className = '';
            }
        },false);

           document.querySelector("#close1").addEventListener("click",function(){
            var o = document.querySelector("#success-box")
            if(o.className == '') {
                o.style.display = 'block';
                o.className = 'active';
            }else{
                o.style.display = 'none';
                o.className = '';
            }
        },false);
    }
</script>
    </div>
</div>

<!-- 一键关注弹出页 -->
<div id="attentionMask" class="homePoupMask">
    <div id="attentionPoup" class="homePoupInner attentionPoup">
        <canvas id="QRImg_canvas1" class="QRImg_canvas"></canvas>
        <img class="QRImg_exportImg" class="hide" src style="position: absolute; top: 0.5rem; z-index: 10; height: 16.5rem"/>
        <!--<img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/caewm.jpg"/>
        <img id="QRImg" src="http://13331192.h40.faiusr.com/2/58/ACgIABACGAAg_ZWcxwUoufmCxAIw2AI42AI.jpg" style="position:absolute;top:0.5rem;left:0;right:0;margin:auto;"/>-->
    </div>
</div>

<!--兑奖二维码弹出层-->
<div id="awardCodeLayer" class="homePoupMask hide">
    <div id="awardCodeDetail" style="border-radius: 0.2rem;">
        <div class='codeLine' style="margin-top:0.4rem;">请联系核销员扫码核销</div>
        <img class="codeImg"/>
        <div class='codeLine' style="padding-top: 0.8rem;"><span class="code selectText"></span></div>
        <div class="codeOptInfo"></div>
    </div>
</div>
              
<!--卡券一键关注弹出页-->
<div id="newAttentionMask" class="homePoupMask hide">
    <div id="newAttentionPoup" class="homePoupInner attentionPoup">
        <canvas id="QRImg_canvas2" class="QRImg_canvas"></canvas>
        <img class="QRImg_exportImg" class="hide" src style="position: absolute; top: 0.5rem; z-index: 10; height: 16.5rem"/>
        <!--<img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/caewm.jpg"/>
        <img id="QRImg_1" style="position:absolute;top:0.5rem;left:0;right:0;margin:auto;"/>-->
    </div>
</div>
<!--公众号兑奖弹出页-->
<div id="plAttentionMask" class="homePoupMask hide">
    <div id="plAttentionPoup" class="homePoupInner attentionPoup">
        <canvas id="QRImg_canvas3" class="QRImg_canvas"></canvas>
        <img class="QRImg_exportImg" class="hide" src style="position: absolute; top: 0.5rem; z-index: 10; height: 16.5rem"/>
        <!--<img src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/caewm.jpg"/>
        <img id="QRImg_1" style="position:absolute;top:0.5rem;left:0;right:0;margin:auto;"/>-->
    </div>
</div>
<!-- 运营账号弹出页 -->




<!-- 加载提示框 -->
<div id="loadingToast" class="hide">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-loading weui-icon_toast"></i>
        <p class="weui-toast__content"></p>
    </div>
</div>




    </div>
<script type="text/javascript">
    function loadGamePreAssets(){
        hg.assets.add(["http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAg-IqyvwUo8oyJ4AcwlwE4jQE.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAggYuyvwUooLznDDCMAThk.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgh4uyvwUomIWNwgcwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgkIuyvwUokvu06gMwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAglYuyvwUo4dbLoQMwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgm4uyvwUoieX8uwQwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgoouyvwUozdCZggcwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgq4uyvwUo0Z7TggUwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgs4uyvwUokO6PZTCMAThu.png"]);
    }
</script>

<script type="text/javascript">
    var _manage = false,
        m_debug = false, 
        _resRoot = '//hdg.faisys.com',
        hg = {};
    //错误监控
    var _preview = false;
    (function(){var _faiAjax=function(){var r=/\?/;var _o={type:"get",url:"",data:"",error:function(){},success:function(){}};var _sendRequest=function(o){var xmlhttp=null;o.type=o.type||_o.type;o.url=o.url||_o.url;o.data=o.data||_o.data;o.error=o.error||_o.error;o.success=o.success||_o.success;if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}if(o.type!="post"){o.url+=(this.r.test(o.url)?"&":"?")+o.data;xmlhttp.open("GET",o.url,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){o.success(xmlhttp.responseText)}else{if(o.error){o.error()}}};xmlhttp.send()}else{xmlhttp.open("POST",o.url,true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8");xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){o.success(xmlhttp.responseText)}else{o.error()}};xmlhttp.send(o.data)}};return{ajax:function(option){try{_sendRequest(option)}catch(e){}}}}();hg._faiAjax=_faiAjax;var _jsErrCahche=[];window.onerror=function(sMsg,sUrl,sLine){if(sLine<1||typeof sMsg!="string"||sMsg.length<1){return}if(/WeixinJSBridge|_WXJS/.test(sMsg)){return}var log="Error:"+sMsg+";Line:"+sLine+";Url:"+sUrl;var alertLog="Error:"+sMsg+"\n"+"Line:"+sLine+"\n"+"Url:"+sUrl+"\n";var encodeUrl=function(url){return typeof url==="undefined"?"":encodeURIComponent(url)};var ajax=true;var obj={"m":sMsg,"u":sUrl,"l":sLine};for(var i=0;i<_jsErrCahche.length;i++){if(_jsErrCahche[i].m==obj.m&&_jsErrCahche[i].u==obj.u&&_jsErrCahche[i].l==obj.l){ajax=false;break}}if(ajax){_jsErrCahche.push(obj);_faiAjax.ajax({type:"post",url:"http://13331192-58.hd.webportal.cc/ajax/logJsErr_h.jsp?cmd=jsErr",data:"msg="+encodeUrl(log)})}if(m_debug){if(HdGame&&HdGame.tlog){HdGame.tlog("err",alertLog)}else{}}}})();

    (function(hg){var imgPaths=[],readyCallBack=[],loadCallBack=[];hg.assets={complete:false,loadComplete:false,increment:5,loadingStyle:3,loadTimeout:120000,add:function(src){var self=this;if(self.complete||_manage){return}if(isArray(src)){for(var i=src.length-1;i>=0;i--){self.add(src[i])}}else if(typeof src==='string'){imgPaths.push(src)}return this},onReady:function(callBack){var self=this;if(self.complete){callBack()}else{readyCallBack.push(callBack)}return self},onload:function(callBack){var self=this;if(self.loadComplete){callBack()}else{loadCallBack.push(callBack)}return self},loadPage:function(){if(_manage)return;var self=this,percent=1,numLoaded=0,$loadPercent=document.getElementById("loadPercent"),loadPallet;window.scrollTo(0,0);if(self.loadingStyle===1){loadimg(imgPaths)}else if(self.loadingStyle===3){var logoImg=document.getElementById("preloadImg");var initLogoImg=function(img){var img=logoImg;var h=img.height;var w=img.width;var bottomPageInfoDeg=-Math.atan(w/h)-Math.PI/2;var canvas=document.getElementById("preloadCanvas");var ctx=canvas.getContext("2d");var ratio=(window.devicePixelRatio||1)/(ctx.backingStorePixelRatio||ctx.webkitBackingStorePixelRatio||ctx.mozBackingStorePixelRatio||ctx.msBackingStorePixelRatio||ctx.oBackingStorePixelRatio||ctx.backingStorePixelRatio||1);var drawImg=function(){ctx.fillStyle="#fff";ctx.fillRect(0.2*g_rem*ratio,0.2*g_rem*ratio,w*ratio,h*ratio);ctx.drawImage(img,0.2*g_rem*ratio,0.2*g_rem*ratio,w*ratio,h*ratio)};if(h===w){if(h>3.5*g_rem){h=w=3.5*g_rem}drawImg=function(){ctx.save();ctx.beginPath();ctx.arc(canvas.width/2,canvas.height/2,w/2*ratio,0,2*Math.PI);ctx.clip();ctx.fillStyle="#fff";ctx.fill();ctx.drawImage(img,0.2*g_rem*ratio,0.2*g_rem*ratio,w*ratio,h*ratio);ctx.restore()}}else{if(w>h&&w>8*g_rem){h=8*g_rem*h/w;w=8*g_rem}else{if(h>w&&h>8*g_rem){w=8*g_rem*w/h;h=8*g_rem}}}canvas.width=(w+0.4*g_rem)*ratio;canvas.height=(h+0.4*g_rem)*ratio;canvas.style.width=w+0.4*g_rem+"px";canvas.style.height=h+0.4*g_rem+"px";if(h===w){ctx.beginPath();ctx.arc(canvas.width/2,canvas.height/2,canvas.width/2,0,2*Math.PI);ctx.clip()}ctx.strokeStyle="#69c5ff";ctx.lineWidth=8*g_rem*ratio;loadPallet=function(tmp){ctx.beginPath();ctx.arc(canvas.width/2,canvas.height/2,4*g_rem*ratio,bottomPageInfoDeg,bottomPageInfoDeg+tmp*(2*Math.PI/100));ctx.stroke();drawImg()};loadimg(imgPaths)};if(logoImg.complete){initLogoImg()}else{logoImg.onload=initLogoImg}}function setPercent(percent){$loadPercent.innerHTML=percent;if(percent===100){var index=0;setTimeout(function(){index++;if(index<10){loadPallet&&loadPallet(120);setTimeout(arguments.callee,17)}else{loadPallet=null}},17)}loadPallet&&loadPallet(percent)}function loading(){if(numLoaded<imgPaths.length){if(percent<100-imgPaths.length+numLoaded){percent++;setPercent(percent-1)}}else{percent+=10;percent>100&&(percent=100);setPercent(percent-1)}if(percent>=100&&typeof $!='undefined'){if(!g_config.test&&g_config.isForbidShareactivity){wx.ready(loadEnd)}else{loadEnd()}return}setTimeout(arguments.callee,10)}function loadEnd(){setPercent(100);var flag=$(window).height()/$(window).width()<1.575;var bgHeight=flag?$(window).width()*1.575:$(window).height();setTimeout(function(){!HdGame.nootNeedFixHeight&&$("#homeBgBox,.gameBgBox").css("height",bgHeight/g_rem+"rem");var theObject=g_config.style==55?$(".gameBox .bottomSkill,#bottomSkill"):$(".home .bottomSkill,#bottomSkill");flag&&theObject.css("top",(bgHeight-$(".bottomSkill").outerHeight())/g_rem+"rem");setTimeout(function(){$loadPercent=null;$("#preloadPage").hide()},500);complete();self.loadComplete=true;for(var n=loadCallBack.length,i=0;i<n;i++){loadCallBack[i]()}loadCallBack=null;logoImg=null;$loadPercent=null;$("#preloadPage").addClass("leftClose")},300)}function loadimg(arr){loading();for(var i=arr.length-1;i>=0;i--){var img=new Image();img.onload=loadCheckComplete;img.onerror=loadCheckComplete;img.src=arr[i];self[arr[i]]=img}if(self.loadTimeout){self._loadTimer=setTimeout(loadTimeout,self.loadTimeout)}}function loadTimeout(){}function loadCheckComplete(){numLoaded++;this.assets_complete=true;if(numLoaded===imgPaths.length){complete()}}function complete(){if(self.complete)return;clearTimeout(self._loadTimer);numLoaded=imgPaths.length;self.complete=true;for(var n=readyCallBack.length,i=0;i<n;i++){readyCallBack[i]()}readyCallBack=null}}}})(hg);
    /*----------------------------可编辑元素包装------------------------------------*/
    hg.edit = null;
    
    hg.edit = {};
    //通过conf文件配置可编辑元素的属性
    (function(hg){
        var origin = [{"name":"playInfo","pos":{"left":"3.5rem","top":"19rem"},"css":[{"css":[{"opt":0,"val":14,"defVal":14},{"opt":0,"val":"","defVal":"","tra":-1,"defTra":-1},{"opt":0,"val":"","defVal":"","tra":-1,"defTra":-1}],"opt":0},{"css":[{"opt":0,"val":14,"defVal":14},{"opt":0,"val":"","defVal":"","tra":-1,"defTra":-1},{"opt":0,"val":"","defVal":"","tra":-1,"defTra":-1}],"opt":0}]},{"name":"theGetPricePic","pos":{"left":"1.2rem","top":"1.5rem"},"size":{"width":"13.5rem","height":"16.75rem"},"path":[["http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/faiImg.png"]]},{"name":"theGetPricePicTwo","pos":{"left":"1.2rem","top":"1.5rem"},"size":{"width":"13.5rem","height":"16.75rem"},"path":[["http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/faiImg2.png"]]},{"name":"theGetPricePicThree","pos":{"left":"NaNrem","top":"NaNrem"},"size":{"width":"4rem","height":"4rem"},"path":[["http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/faiImg3.png"]]},{"name":"lotsPot","pos":{"left":"4.9rem","top":"3rem"},"size":{"width":"6.15rem","height":"12.4rem"},"path":[["http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/lots1.png"]]},{"name":"lotsShakeHand","pos":{"left":"4.5rem","top":"17.9rem"}}];
        var originDef = [{"name":"playInfo","pos":{"left":"3.5rem","top":"19rem","forParent":"false"},"css":[{"title":"常规文字","opt":0,"from":"#playInfo","css":[{"type":"size","name":"font-size","val":14,"defVal":14,"opt":0},{"type":"color","name":"color","defVal":"#604108","val":"","tra":-1,"defTra":-1,"opt":0},{"type":"color","name":"text-shadow","val":"","defVal":"","tra":-1,"defTra":-1,"opt":0}]},{"title":"参与机会","opt":0,"from":"#playInfo .specil","css":[{"type":"size","name":"font-size","val":14,"defVal":14,"opt":0},{"type":"color","name":"color","val":"","defVal":"rgb(254, 194, 0)","tra":-1,"defTra":-1,"opt":0},{"type":"color","name":"text-shadow","val":"","defVal":"","tra":-1,"defTra":-1,"opt":0}]}],"edit":3},{"name":"theGetPricePic","pos":{"left":"0.75rem","top":"0.15rem"},"size":{"width":"14.5rem","height":"18rem"},"path":[["*_resRoot*/image/faiImg.png","图片01","5000k"]],"edit":"theGetPricePic","formDefaultStyle":true},{"name":"theGetPricePicTwo","pos":{"left":"0.75rem","top":"0.15rem"},"size":{"width":"14.5rem","height":"18rem"},"path":[["*_resRoot*/image/faiImg2.png","图片01","5000k"]],"edit":"theGetPricePicTwo","formDefaultStyle":true},{"name":"theGetPricePicThree","pos":{"left":"0.75rem","top":"0.15rem"},"size":{"width":"14.5rem","height":"18rem"},"path":[["*_resRoot*/image/faiImg3.png","图片01","5000k"]],"edit":"theGetPricePicThree","formDefaultStyle":true},{"name":"lotsPot","pos":{"left":"4.925rem","top":"3rem"},"size":{"width":"6.15rem","height":"12.4rem"},"path":[["*_resRoot*/image/lots1.png","图片01","5000k"]],"edit":"lotsPot","formDefaultStyle":true},{"name":"lotsShakeHand","pos":{"left":"4.5rem","top":"17.9rem","forParent":"false"},"edit":"_none","formDefaultStyle":true},{"name":"advertising","rsize":{"width":"16rem","height":"40rem"},"path":["*_resRoot*/image/gg.jpg"],"edit":"_background","formDefaultStyle":true}];
        var originMod = null;
        if(originMod && false){
            origin = JSON.parse(JSON.stringify(originMod));
            hg.edit.isMod = true;
        }
        
        var correct = function(list1,list2){
            return list2.map(function(val2){
                return list1.filter(function(val1){return val1.name === val2.name;})[0] || val2;
            });
        }
        var correctPaths = function(pathDef,path){
            if(!path || !isArray(pathDef[0])) return;
            if(!isArray(path[0])){
                path[0] = [path[0]];
                path.length = 1;
            }
            if(pathDef.length > path.length){ //同步数据结构
                pathDef.forEach(function(defv,i){
                    if(i >= path.length){
                        path.push(defv);
                    }
                });
            }
        }
        originMod = originMod ? correct(originMod,originDef) : originMod;
        origin = originMod ? correct(origin,originMod) : correct(origin,originDef);
        //将图片放进缓存数组内
        for(var i=0;i < originDef.length;i++){
            var path = origin[i].path;
            var pathDef = originDef[i].path;
            var pathMod = originMod ? originMod[i].path : null;
            var notDeferPath = !originDef[i].deferPath;
            correctPaths(pathDef,pathMod);
            correctPaths(pathDef,path);
            pathDef = pathMod || pathDef;
            if(pathDef){
                if(!path){
                    origin[i].path = path = pathDef;
                }
                if(isArray(path[0])){
                    for(var j=0;j < pathDef.length;j++){
                        if(!path[j]) path[j] = pathDef[j];
                        if(!path[j][0]) path[j][0] = pathDef[j][0];
                        notDeferPath && hg.assets.add(path[j][0].replace('*_resRoot*',_resRoot));
                    }
                }else{
                    if(!path[0]) path[0] = pathDef[0];
                    notDeferPath && hg.assets.add(path[0].replace('*_resRoot*',_resRoot));
                }
            }
            if(origin[i].name == 'advertising'){
                document.getElementById('advertising').style.backgroundImage = "url("+path[0].replace('*_resRoot*',_resRoot)+")";
            }
        }
        if(false){
            hg.assets.add("");
        }
        if(false && origin[1].path[0] == _resRoot + "/image/tgcm/answer.png"){
            origin[1].path[0] = [_resRoot + "/image/tgcm/drag.png"];
        }
        hg.edit.origin = origin;
        hg.edit.originDef = originDef;
        hg.edit.originMod = originMod;
    })(hg);
    
    /*-----------------------资源loading-----------------------------*/
    //存放所有loading好的image对象,src为key
    hg.assets.add([
        "http://7020498.h40.faiusr.com/2/114/ACgIABACGAAg2YiyvwUo8pS2RDCABTjADA.jpg","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/logo.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/ruleImg.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/success.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/light.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/bird.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/musicOff.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/musicOn.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/auBg.jpg","http://wx.qlogo.cn/mmopen/vi_32/S0mDvTpQxAemDgxCF2hlJTBhWwDlJd2nZhxb5ia7wqDZnB8RgCYsut6djiaNbj2Jy1FCnbW3zmmz4QdzgC5rBicsg/0",
    
        "http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgkImyvwUogpuh6QMwvAQ4gAI.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAg6IiyvwUog6X65wcwsgI4fA.png","http://7020498.h40.faiusr.com/2/114/ACgIABACGAAg5IqyvwUogPqHiQIwgAU4wAw.jpg","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/lots1.png","http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/lots2.png",
    
        '//hdg.faisys.com/image/faiImg.png',
    
    ]);
    loadGamePreAssets();
    hg.assets.loadPage();//开始loading页面
    //全局变量
    var g_config = {"showSkillSup":true,"showSlide":false,"isOpenAreaLimit":false,"isCheckPlayTimes":true,"showMenu":true,"buy":false,"isNewGame":false,"isModel":false,"test":false,"isOem":true,"scoreType":false,"showLogo":false,"flag":1073821702,"flagB":2304,"countsTimeType":0,"sortType":0,"drawLimitDef":80,"scoreSet":80,"style":10,"aid":13331192,"gameId":58,"openId":"oI_3MwcBSLmaxopJR2fbLpM-75Pc","playerId":0,"userName":"忆枫","headImg":"http://wx.qlogo.cn/mmopen/vi_32/S0mDvTpQxAemDgxCF2hlJTBhWwDlJd2nZhxb5ia7wqDZnB8RgCYsut6djiaNbj2Jy1FCnbW3zmmz4QdzgC5rBicsg/0","authVer":0,"scoreUnit":"分","testCMD":"","ajaxUrl":"http://13331192-58.hd.webportal.cc/ajax/","startTime":"2017-04-07 11:41","setGameTimeInterval":10,"isDoubleGame":false,"awardList":[{"amount":60,"awardtype":2,"cashtype":2,"attention":3,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"一等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":true,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"关注我们","btl":"","servicepho":"0754-83210486","cashinfo":"活动仅供体验，不予兑奖，祝天天开心。","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://13331192.h40.faiusr.com/2/58/ACgIABACGAAg1pWcxwUox5bs6wUw2AI42AI.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值100元礼品","level":1,"passwordrednum":100},{"amount":60,"awardtype":2,"cashtype":2,"attention":3,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"二等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":true,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"关注我们","btl":"","servicepho":"0754-83210486","cashinfo":"活动仅供体验，不予兑奖，祝天天开心。","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://13331192.h40.faiusr.com/2/58/ACgIABACGAAg3pWcxwUorNPSxQQw2AI42AI.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值50元礼品","level":2,"passwordrednum":100},{"amount":60,"awardtype":2,"cashtype":2,"attention":3,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"三等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":true,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"关注我们","btl":"","servicepho":"0754-83210486","cashinfo":"活动仅供体验，不予兑奖，祝天天开心。","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://13331192.h40.faiusr.com/2/58/ACgIABACGAAg45WcxwUozKaa8gIw2AI42AI.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值10元礼品","level":3,"passwordrednum":100},{"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"四等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","txn":"兑奖须知","txc":"联系商家出示兑奖码","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://hd.faisys.com/image/qrcodeImg.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值5元小礼品","level":4,"passwordrednum":100,"wxcardid":""},{"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"五等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","txn":"兑奖须知","txc":"联系商家出示兑奖码","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://hd.faisys.com/image/qrcodeImg.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值5元小礼品","level":5,"passwordrednum":100,"wxcardid":""},{"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"六等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","txn":"兑奖须知","txc":"联系商家出示兑奖码","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://hd.faisys.com/image/qrcodeImg.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值5元小礼品","level":6,"passwordrednum":100,"wxcardid":""},{"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"七等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","txn":"兑奖须知","txc":"联系商家出示兑奖码","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://hd.faisys.com/image/qrcodeImg.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值5元小礼品","level":7,"passwordrednum":100,"wxcardid":""},{"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"八等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1491494400000,"cet":1492185599000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","txn":"兑奖须知","txc":"联系商家出示兑奖码","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://hd.faisys.com/image/qrcodeImg.jpg","onlinect":1,"continfo":0,"excelName":"","name":"价值5元小礼品","level":8,"passwordrednum":100,"wxcardid":""}],"comfort":{"comAwardtype":2,"comcashtype":2,"comattention":1,"comcashsite":"请填写您的兑奖地址或者门店地址","cas":"安慰奖","cttype":"DATE_TYPE_FIX_TIME_RANGE","comcbt":1491494400000,"comcet":1492185599000,"comft":30,"comfbt":0,"ctlmt":"[8]","comoci":false,"comOpqrc":true,"comoptx":false,"comoct":false,"comOplink":false,"comiscuscode":false,"comstl":"","comopti":"凭券联系现场工作人员兑奖","comtxn":"兑奖须知","comtxc":"联系商家出示兑奖码","combtn":"了解更多","combtl":"","comservicephone":"","comcashinfo":"","comimg":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","comimgw":"6rem","comimgh":"6rem","comattentionimg":"http://hd.faisys.com/image/qrcodeImg.jpg","conlinect":1,"comcontinfo":0,"ca":"价值5元小礼品","cc":"","ccc":""},"bestRankInfo":{},"awardInfoB":"","openAwardLinkNoDraw":false,"userInfo":{},"awardUsername":"","awardPhone":"","awardAddress":"","addressNum":"","status":0,"afterWxCard":true,"haveAward":false,"showHelpGuide":false,"ipInfo":{},"contactNoDraw":"[-1]","isAOpenId":0,"linkInfoType":1,"afterLinkModify":true,"shareDeep":0,"isFromZhuliShare":false,"qrCodeUrl":"http://13116682.h40.faiusr.com/2/ACgIABACGAAg-929zQUowN60yAIwkAM4kAM.jpg","isAngular":true,"isPreview":false,"$$awardTypeInfo":{"def":{"collect":"收藏兑奖券","showcashtype":false,"showsitebox":true,"qrcode":false,"showcopy":true,"opti":"凭券联系现场工作人员兑奖","codename":"兑奖码","details":"兑奖券详情","deadline":"兑奖期限","showwxcard":true,"notice":"兑奖须知","cuscode":true,"cashsite":"请填写您的兑奖地址或者门店地址","sitetype":"text","site":"","term":true,"btn":""},"2":{"showcashtype":true,"1":{"1":{"sitetype":"img"},"2":{"cashsite":"http://","sitetype":"url"}},"2":{"qrcode":true,"btn":""},"3":{"showsitebox":false,"sitetype":"img","opti":"复制券码发送到公众号"},"4":{"opti":"点击\u201C立即兑奖\u201D跳转到兑奖界面","cashsite":"http://","sitetype":"url","site":"网页链接"},"btn":"立即兑奖","site":"兑奖地址"},"0":{"collect":"收藏优惠券","qrcode":true,"opti":"到店后向店员出示","codename":"优惠码","details":"优惠券详情","deadline":"使用期限","notice":"使用须知","cashsite":"请填写您的门店地址","site":"门店地址"},"1":{"collect":"收藏优惠券","opti":"购物时凭优惠码联系客服兑奖","codename":"优惠码","details":"优惠券详情","deadline":"使用期限","notice":"使用须知","sitetype":"url","cashsite":"http://m.jd.com","site":"商城地址","btn":"进入商城"},"5":{"collect":"收藏口令码","showsitebox":false,"codename":"口令码","deadline":"领取期限","showwxcard":false,"notice":"领取须知","cuscode":false,"term":false,"btn":"立即领取","0":{"sitetype":"img","opti":"复制口令发送到公众号"},"1":{"sitetype":"url","opti":"点击下方\"立即领取\"进行兑奖","showcopy":false}},"4":{"collect":"放入微信卡包","opti":"到店后向店员出示","codename":"优惠码","details":"优惠券详情","deadline":"使用期限","qrcode":"auto","showwxcard":false,"notice":"使用须知","sitetype":"none","btn":""}},"areaLimitList":[],"linkInfoAll":true,"isForbidShareactivity":false,"drawType":1,"isOldZhuliGame":false,"createTime":1491536786000,"isYKY":false,"awardNum":3,"openComfort":false,"theDefaultGiftImgSrc":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","storeId":0,"ykyWXOpenId":"","ykyRelationId":"","redPacketUrl":"https://hd.webportal.cc/13331192/58/jumptoRedPacket.html?gameAppid=wx40943371deceb15d","ishasAttentiosThisAPP":false,"clickTips":{"clickSrc":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/clickView.png","pointW":"2rem","pointH":"2rem","clickW":"3.3rem","clickH":"3.65rem"},"urlToken":"58"};
    var isPublish = false;
    var HdVerDef = {
        FREE : 0,  //免费版
        BY : 1,  //白银版
        BJ : 2,  //铂金版
    };
    function isArray(arr){
        return Object.prototype.toString.call(arr) === "[object Array]";
    }
    var isOldAwardPage = true;
</script>
<script type="text/javascript" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/js/jquery/jquery-core.min.js"></script>

<script type="text/javascript" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/js/hdUtil.min.js"></script>
<script type="text/javascript" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/js/hdgame.min.js"></script>
<script type="text/javascript" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/js/lufylegend.min.js"></script>
<script type="text/javascript" src="http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/js/city2.min.js"></script>
<script type="text/javascript">
function $$(selector){
    if(!_manage||_preview){
        return $('#__notfound__');
    }
    return parent.$(selector);
}
HdGame.gameDomain = 'hd.faisco.cn';
HdGame.gameDomainIgnoreStyle = 'hd.faisco.cn';
if(true){
    HdGame.gameDomain = 'hd.webportal.cc';
    HdGame.gameDomainIgnoreStyle = 'hd.webportal.cc';
}
HdGame.isReg = false;
if(_manage&&!_preview){
    if(parent != self){
        $(function() {
            parent.$$.fire("ready");
        });
        parent.$$.win = window;
    }else{
        //parent.Edit = {addEditBtn : function(){}}
    }
}
/*---------------游戏函数回调--------------------*/
HdGame.initCallBack(hg,['startGame','beforeStartGame','startGamehead','home','again','jsFootEnd','showResult','changeBottomBar','showPoup','hidePoup','timeChange','beforeDraw','updateRankList','afterDraw']); //hdgame
hg.register(['setGameType','hpInit','hgLoadEnd','save','changeShow','showTabByStyle']); //hdportal
hg.showGameBox = true; //是否在开始游戏时默认显示游戏页
/*----------------------------可编辑元素包装------------------------------------*/
//通过conf文件配置可编辑元素的属性
if(hg.edit){
    HdGame.initEdit(hg.edit);
}
function parseRemToPx(rem){
    if(rem.indexOf('rem') === -1){
        return parseFloat(rem);
    }
    return parseFloat(rem)*g_rem;
}
function parsePxToRem(px){
    if(px.indexOf('px') === -1){
        return px;
    }
    return parseFloat(px)/g_rem + 'rem';
}
/*----------------------------------计时------------------------------------*/
hg.time = null;

(function(hg){
    var initTime = 30;
    if(!g_config.countsTimeType && initTime === 0){
        if(!_manage){
            initTime = 99999;
        }else{
            if(false){
                initTime = 30;
            }else{
                initTime = 30; 
            }
        }
        $(function(){$('.timeBox').hide();});
    }
    hg.time = HdGame.initTime(initTime);
})(hg);

/*----------------------------------计分------------------------------------*/

hg.grade = HdGame.initGrade();

/*----------------------------------声音-----------------------------------*/
hg.sound = HdGame.initSound([{"path":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/bgmusic03M.mp3","fileName":"背景音乐.mp3","optFlag":0},{"path":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/bonus.mp3","fileName":"得分音效.mp3","optFlag":2},{"path":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/boom.mp3","fileName":"扣分音效.mp3","optFlag":2}],[{"path":"*_resRoot*/image/tdhx/bgmusic03M.mp3","fileName":"背景音乐.mp3","optFlag":0},{"path":"*_resRoot*/image/tdhx/bonus.mp3","fileName":"得分音效.mp3","optFlag":2},{"path":"*_resRoot*/image/tdhx/boom.mp3","fileName":"扣分音效.mp3","optFlag":2}],null);

/*----------------------------------获取ip信息-----------------------------------*/
//HdGame.initAreaLimit(false);
//HdGame.tlog('openId',HdGame.getCookie('oppenId_20160112wx40943371deceb15d'));
(function(){//特殊处理某些rem出问题的手机 create by turbo
    var curFontSize = parseFloat($("html").css("font-size"));
    if(curFontSize != g_rem) {
        var rate = 1;
        if((curFontSize / g_rem) < 0.9 || (curFontSize / g_rem) > 1.1) {
            rate = curFontSize / g_rem;
        }
        refreshRemForSpecial(g_rem,rate);
    }
    function refreshRemForSpecial(rem,rate) {
        var newFontSize = rem / rate;
        $("html").css("font-size",newFontSize + "px");
        HdGame.logStd("rem-special","width:" + $('html')[0].getBoundingClientRect().width + "|g_rem:" + rem + "|rate:" + rate + "|oldFontSize:" + curFontSize + "|newFontSize:" + newFontSize + "|userAgent:" + navigator.userAgent);
    }
})();
</script>

<script type="text/javascript">
HdGame.initWxConfig({"isHideShareBtn":false,"isHideMenuItems":false,"fullUrl":"https://13331192-58.hd.webportal.cc/13331192/58/load.html?style=10","nameList":["一等奖","二等奖","三等奖","四等奖","五等奖","六等奖","七等奖","八等奖","安慰奖"],"jsSdkAppid":"wx40943371deceb15d","timestamp":"1508292885","nonce_str":"3d976738-87ca-4e37-b916-4895e8d9b66f","signature":"d308269e5faff6f4e5372426450d60b23e7b48f1","cardTicket":"","dynamicShareUrlRootEmpty":false,"dynamicShareUrlRoot":"http://13331192-58.hd.webportal.cc/","fsl":"b","shareDeep":0,"checkControlLevel":0,"openStrongAttention":false,"shareImg":"http://7020498.h40.faiusr.com/2/114/ACgIABACGAAg04uyvwUosOz0iQEwyAE4yAE!160x160.jpg","activeName":"参与活动赢大奖","wxShareText_def":"轻轻松松就能抽到大奖，积攒多年的人品终于有用了，你也赶紧来抽奖吧！！","wxShareText_award":"<span class=\"tag\" contenteditable=\"false\">玩家名称<\/span>已经在活动里赢得<span class=\"tag\" contenteditable=\"false\">奖品名称<\/span>，你也快来玩游戏赢大奖吧！","wxShareText_rank":"<span class=\"tag\" contenteditable=\"false\">玩家名称<\/span>以<span class=\"tag\" contenteditable=\"false\">游戏成绩<\/span>的成绩傲视群雄，你敢来挑战Ta赢取丰厚奖品吗？","addDrawTime":1})

</script>
<script type="text/javascript">
    var percent = 0;
    var speedR = 1;
    var gameFirst = true;
    var _gameOver = false;

    var size_pos_gameImgs = {"gamePlay0":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"3rem\",\"top\":\"7rem\"}"},"gamePlay1":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"3rem\",\"top\":\"2.5rem\"}"},"gamePlay2":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"11.5rem\",\"top\":\"4.5rem\"}"},"gamePlay3":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"6rem\",\"top\":\"11rem\"}"},"gamePlay4":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"11.5rem\",\"top\":\"8.5rem\"}"},"gamePlay5":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"3rem\",\"top\":\"14rem\"}"},"gamePlay6":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"9.5rem\",\"top\":\"0rem\"}"},"gamePlay7":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"11.5rem\",\"top\":\"15.5rem\"}"},"gamePlayHold":{"size":"{\"width\":\"4.5rem\",\"height\":\"3.75rem\"}","pos":"{\"left\":\"1.25rem\",\"top\":\"15.35rem\"}"}};
    var size_pos_gameImgs_def = {"gamePlay0":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"3rem\",\"top\":\"7rem\"}"},"gamePlay1":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"3rem\",\"top\":\"2.5rem\"}"},"gamePlay2":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"11.5rem\",\"top\":\"4.5rem\"}"},"gamePlay3":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"6rem\",\"top\":\"11rem\"}"},"gamePlay4":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"11.5rem\",\"top\":\"8.5rem\"}"},"gamePlay5":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"3rem\",\"top\":\"14rem\"}"},"gamePlay6":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"9.5rem\",\"top\":\"0rem\"}"},"gamePlay7":{"size":"{\"width\":\"3.45rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"11.5rem\",\"top\":\"15.5rem\"}"},"gamePlayHold":{"size":"{\"width\":\"4.85rem\",\"height\":\"2.5rem\"}","pos":"{\"left\":\"1rem\",\"top\":\"16.5rem\"}"}};

    var gamePlayPanel_h = 0,
        gamePlayPanel_t = 0,
        gamePlayHold_h = 0,
        gamePlayHold_w = 0;

    var createTime = 1000;
    
    var imgHold = new ImageObject();
    var gameImgPaths = ["http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAggYuyvwUooLznDDCMAThk.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgh4uyvwUomIWNwgcwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgkIuyvwUokvu06gMwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAglYuyvwUo4dbLoQMwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgm4uyvwUoieX8uwQwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgoouyvwUozdCZggcwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgq4uyvwUo0Z7TggUwjAE4bg.png","http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAgs4uyvwUokO6PZTCMAThu.png"];
    hg.assets.onReady(
        function(){
            imgHold.image = hg.assets['http://7020498.h40.faiusr.com/4/114/ACgIABAEGAAg-IqyvwUo8oyJ4AcwlwE4jQE.png'];
            for(var i = 0;i < gameImgPaths.length;i++){
                var image = new Image();
                image.src = gameImgPaths[i];
                var tem = {};
                tem.img = hg.assets[gameImgPaths[i]];
                var imgSize = $.parseJSON(size_pos_gameImgs['gamePlay' + i].size);
                tem.size = {
                    "w" : parseRemToPx(imgSize.width), 
                    "h" : parseRemToPx(imgSize.height)
                };

                gameImgPaths[i] = tem;
            }
        }
    );
    var clientWidth = $(window).width(),
        clientHeight = $(window).height(),
        htmlFontSize = parseInt($('html').css('font-size').replace('px',''));
    if(_manage){
        window.onload = function(){ //兼容IE10
            setTimeout(function(){
                clientWidth = $(window).width();
                clientHeight = $(window).height();
                $('#gameBgBox').css('height',clientHeight);
                $('#homeBgBox').css('height',clientHeight);
            },10);
        };
    }
    var canvas = "";
    var ctx = "";
    var imgFallList = new Array();
    var scoreList = new Array();
    var moveX = htmlFontSize,
        touchX = htmlFontSize,
        moveSpeed = 30;

    //设置倒计时
    window.requestAnimFrame = function() {
        return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || 
        function(a) {
            window.setTimeout(a, 1e3 / 60, (new Date).getTime())
        }
    }();
    $(function(){   
        canvas = document.getElementById("canvas");
        ctx = canvas.getContext("2d");
        ctx.globalCompositeOperation = 'source-atop';
        ctx.imageSmoothingEnabled && (ctx.imageSmoothingEnabled = true);
        
        $('#gameBgBox').css('height',clientHeight);
        $('#homeBgBox').css('height',clientHeight);
        gameInit();
        if(_manage){        
            gamePicLayer();
            gamePlayPanel_t = 6*g_rem;
            gamePlayPanel_h = clientHeight - gamePlayPanel_t;
            $('#gamePlayPanel').css('top','6rem').height(gamePlayPanel_h);
            $('#gamePlayPanel img').each(function(index){
                var imgKey = $(this).attr('id');
                var tem = size_pos_gameImgs[imgKey];
                var size = $.parseJSON(tem.size);
                var pos = $.parseJSON(tem.pos);
                $(this).css({
                    'top'   : pos.top,
                    'left'  : pos.left,
                    'width' : size.width,
                    'height': size.height
                }).addClass('slaveImg');
                var temDef = size_pos_gameImgs_def[imgKey];
                var sizeDef = $.parseJSON(temDef.size);
                var reSizeDef = {
                    width  : sizeDef.width,
                    height : sizeDef.height
                }
                $(this).wrap('<div class="imgContainer absCenter"></div>');
                if(imgKey === 'gamePlayHold'){
                    var gamePlayHoldTop = clientHeight - parseInt($('#gamePlayPanel').css('top')) - $(this).height() - 2;
                    $(this).css('top',gamePlayHoldTop);
                    $(this).setResizableOption({handles:'n,e,w,ne,nw'})
                    .setDraggableOption({axis:'x'})
                    .addResizableFn('resize',function(event,ui) {
                        $(ui.element).css('top',ui.originalPosition.top + ui.originalSize.height - parseFloat($(ui.element).css('height')));
                    });
                    reSizeDef.top = gamePlayHoldTop;
                }
                HdGame.moduleSlaveImgResize($(this),reSizeDef,'#gamePlayPanel');
                HdGame.moduleDraggale($(this),true,'#gamePlayPanel');
            });
        }else{
            hg.on('startGame',gameStart);
            hg.time.setAcceList(4);
            hg.time.updateFlag = false;
            hg.time.on('acce',function(index){
                if(index === 1){
                    createTime = 800;
                    speedR = 1.2;
                }else if(index === 2){
                    createTime = 500;
                    speedR = 1.5;
                }else if(index === 3){
                    createTime = 300;
                    speedR = 1.8;
                }
            }).on('end',function(){
                _gameOver = true;
                speedR = 1;
                gameOver(hg.grade.val);
            });
            gamePlayPanel_t = 6*g_rem;
            gamePlayPanel_h = clientHeight;
            $('#gamePlayPanel').height(gamePlayPanel_h);
            canvas.width = clientWidth;
            canvas.height = gamePlayPanel_h;
            hg.assets.onload(function(){
                var ratio = LF.setCanvasePixelRatio();
                //压缩画布
                canvas.style.height = canvas.height + 'px';
                canvas.style.width = canvas.width + 'px';
                canvas.width *= ratio;
                canvas.height *= ratio;
            })
        }
        $('#canvas').bind('touchmove touchstart',function(e){
            e.preventDefault();
            e = e.originalEvent;
            touchX = e.clientX || e.changedTouches[0].clientX;
            moveX = touchX - imgHold.w/2;
        });
    });
    
    function gamePicLayer(){
        var gameImgArgs = [];
        var gameArgHold = {};
        gameArgHold.from = "#gamePlayHold";
        gameArgHold.title = '*承接物品*';
        gameArgHold.limit = '5000k';
        gameArgHold.defSrc = '//hdg.faisys.com/image/tdhx/hxHold.png';
        var gameArg0 = {};
        gameArg0.from = "#gamePlay0";
        gameArg0.title = '*掉分物品*';
        gameArg0.limit = '5000k';
        gameArg0.defSrc = '//hdg.faisys.com/image/tdhx/hx00.png';
        var gameArg1 = {};
        gameArg1.from = "#gamePlay1";
        gameArg1.title = '加分物品01';
        gameArg1.limit = '5000k';
        gameArg1.defSrc = '//hdg.faisys.com/image/tdhx/hx01.png';
        var gameArg2 = {};
        gameArg2.from = "#gamePlay2";
        gameArg2.title = '加分物品02';
        gameArg2.limit = '5000k';
        gameArg2.defSrc = '//hdg.faisys.com/image/tdhx/hx02.png';
        var gameArg3 = {};
        gameArg3.from = "#gamePlay3";
        gameArg3.title = '加分物品03';
        gameArg3.limit = '5000k';
        gameArg3.defSrc = '//hdg.faisys.com/image/tdhx/hx03.png';
        var gameArg4 = {};
        gameArg4.from = "#gamePlay4";
        gameArg4.title = '加分物品04';
        gameArg4.limit = '5000k';
        gameArg4.defSrc = '//hdg.faisys.com/image/tdhx/hx04.png';
        var gameArg5 = {};
        gameArg5.from = "#gamePlay5";
        gameArg5.title = '加分物品05';
        gameArg5.limit = '5000k';
        gameArg5.defSrc = '//hdg.faisys.com/image/tdhx/hx05.png';
        var gameArg6 = {};
        gameArg6.from = "#gamePlay6";
        gameArg6.title = '加分物品06';
        gameArg6.limit = '5000k';
        gameArg6.defSrc = '//hdg.faisys.com/image/tdhx/hx06.png';
        var gameArg7 = {};
        gameArg7.from = "#gamePlay7";
        gameArg7.title = '加分物品07';
        gameArg7.limit = '5000k';
        gameArg7.defSrc = '//hdg.faisys.com/image/tdhx/hx07.png';

        gameImgArgs.push(gameArgHold);
        gameImgArgs.push(gameArg0);
        gameImgArgs.push(gameArg1);
        gameImgArgs.push(gameArg2);
        gameImgArgs.push(gameArg3);
        gameImgArgs.push(gameArg4);
        gameImgArgs.push(gameArg5);
        gameImgArgs.push(gameArg6);
        gameImgArgs.push(gameArg7);

        HdGame.initModuleLayer('#gamePlayHold',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay0',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay1',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay2',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay3',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay4',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay5',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay6',-1,"",gameImgArgs);
        HdGame.initModuleLayer('#gamePlay7',-1,"",gameImgArgs);
    }
    function showGamePage(){
        $('#ruleImg').hide();
        $('.homeBtnBox').hide();
        $('.footerBox').hide(); 
        $('.home').hide();
        $('#poupInfoBox').hide();
        $('.resuleBox').hide();
        $('.gameBox').show();   

        gamePlayPanel_h = clientHeight - parseInt($('#gamePlayPanel').css('top').replace('px',''));
        $('#gamePlayPanel').height(gamePlayPanel_h);
    }
    function loadPercent(){
        percent = percent+1;
        $('.percent').html(percent);
        if(percent > 99){
            setTimeout(function(){
                $('.loadingBox').hide();
                $('.gameBox').show();
            },500); 
            return;
        }
        setTimeout(loadPercent,12);     
    }
   
    function isIPhone6(){
        return window.navigator.userAgent.indexOf('iPhone') !== -1&&(window.screen.availWidth === 375 || window.screen.availWidth === 414);
    }
    function isIPhone4(){
        return window.navigator.userAgent.indexOf('iPhone') !== -1&&(window.screen.availHeight === 460);
    }
    function isAndroid(){
        return window.navigator.userAgent.indexOf('Android') !== -1;
    }
    function gameInit() {
        hg.grade.set(0);
        _gameOver = false;
        createTime = 1000;
        hg.time.init();
        $('.timeUpImg').hide();
    }
    function home(){
        percent = 0;    
        $('#ruleImg').show();
        $('.homeBtnBox').show();
        $('.footerBox').show();
        $('.gameBox').hide();
        startBtnDelay();
        $('.home').show();
        $('#poupInfoBox').hide();
        $('.resuleBox').hide();
        gameInit();
        hg.fire('home');
    }   
    function gameRestart() {
        $('.gameBox').show();
        gameInit();
        gameStart();
        hg.fire('again');
    }
    var gameStartFlag = false;
    function gameStart() {      
        if(gameStartFlag){
            return;
        }
        ctx.clearRect(0,0,canvas.width,canvas.height);
        if(gameFirst){
            LF.setTopBarNotLF(canvas);
            gameFirst = false;
        }
        window.scrollTo(0,0);
        gameStartFlag = true;
        moveX = htmlFontSize;
        touchX = htmlFontSize;
        var imgSize = $.parseJSON(size_pos_gameImgs['gamePlayHold'].size);
        imgHold.w = parseRemToPx(imgSize.width);
        imgHold.h = parseRemToPx(imgSize.height);
        imgHold.x = htmlFontSize;
        imgHold.y = gamePlayPanel_h  - imgHold.h - gamePlayPanel_t;
        ctx.save();
        ctx.translate(0,gamePlayPanel_t);
        drawImg(imgHold);
        ctx.restore();

        imgFallList = [];
        scoreList = [];
        gameImgFall();
        setTimeout(function(){
            hg.time.start();
            gamePlay();
            gameStartFlag = false;
        },1000);
    }
    
    //管理态，游戏预览
    function ImageObject(){
        this.x = 0;
        this.y = 0;
        this.w = 0;
        this.h = 0;
        this.type = -1;
        this.speed = 5;
        this.flag = 0;
        this.image = new Image();
    }

    //访客态，游戏过程
    function gamePlay(){
        if(_gameOver){
            return;
        }
        //超过的范围就隔一秒执行。
        if((isIPhone4()) && imgFallList.length >= 7){
            setTimeout(function(){gamePlay();},1000);
        }else if(isAndroid() && imgFallList.length >= 11){
            setTimeout(function(){gamePlay();},1000);
        }else if(imgFallList.length >= 15){
            setTimeout(function(){gamePlay();},1000);
        }else{
            var create_time = GetRandomNum(createTime/2,createTime);
            var index_img = GetRandomNum(0,9);
            var speed = GetRandomNum(300,500)/2000;
            index_img = index_img > 7 ? 0 : index_img;

            var imgFall = new ImageObject();
            var imgTem = gameImgPaths[index_img];
            imgFall.image = imgTem.img;
            var w = imgTem.size.w;
            var h = imgTem.size.h;
            imgFall.speed = speed*speedR;
            imgFall.type = index_img;
            imgFall.x = GetRandomNum(0,clientWidth - w);
            imgFall.y = -h;
            imgFall.w = w;
            imgFall.h = h;
            imgFallList.push(imgFall);
            setTimeout(function(){
                gamePlay();
            },create_time);
        }   
    }
    var lastTime = (new Date).getTime();
    var gameDelta = 0;
    //物品下落
    function gameImgFall(){
        if(_gameOver){
            return;
        }
        var currentTime = (new Date).getTime();
        gameDelta = currentTime - lastTime;
        lastTime = currentTime;
        gameDelta > 500 && (gameDelta = 0);
        ctx.globalAlpha = 1;
        ctx.clearRect(0,0,canvas.width,canvas.height);
        ctx.save();
        ctx.translate(0,gamePlayPanel_t);
        drawImgHold();
        var i = 0;var t = "";var temp = "";
        for(;i < imgFallList.length;i++){
            t = imgFallList[i];
            ctx.globalAlpha = 1;
            if(t.flag > 0){//淡出效果
                t.flag -= 10;
                ctx.globalAlpha = t.flag / 100;
                drawImg(t);
                if(t.flag == 0){
                    imgFallList.splice(i,1);
                    i--;
                }
            }else{
                t.y += t.speed*gameDelta;
                drawImg(t);
                if(holdImgType(t) == 1){
                    if(t.type == 0){
                        hg.grade(-20);
                        hg.sound.play(2);
                    }else{
                        hg.grade(5);
                        hg.sound.play(1);
                    }
                    temp = new ImageObject();
                    temp.type = t.type;
                    temp.x = t.x+t.w/2;
                    temp.y = imgHold.y;
                    temp.speed = 1;
                    scoreList.push(temp);
                    t.flag = 100;
                }else if(holdImgType(t) == 2){
                    t.flag = 100;
                }
            }
        }

        ctx.font = "bold 20px Arial";
        ctx.textAlign = "center";
        ctx.baseBaseLine = "middle";
        for(var j=0;j<scoreList.length;j++){
            var s = scoreList[j];
            s.y -= s.speed;
            if(imgHold.y - s.y < 20){
                if(s.type == 0){
                    ctx.fillStyle = "#f52121";
                    ctx.fillText("-20",s.x,s.y);
                }else{
                    ctx.fillStyle = "#f9ea42";
                    ctx.fillText("+5",s.x,s.y);
                }
            }else{
                scoreList.splice(j,1);
            }
        }
        ctx.restore();
        hg.time.updateInFrame(gameDelta);
        LF.showTopBar();
        if(i >= imgFallList.length){
            requestAnimFrame(gameImgFall);
        }
        
    }

    function holdImgType(t){
        var in_l = (t.x + t.w) > (imgHold.x + 5),
            in_r = (imgHold.x + imgHold.w) > (t.x + 5),
            in_t = (t.y + t.h) > (imgHold.y + 10), 
            in_b = (imgHold.y + imgHold.h) > (t.y + 10);
            out_b = (imgHold.y + imgHold.h + 10) < t.y;

        if(in_l && in_r && in_t && in_b){
            return 1;
        }else if(out_b){
            return 2;
        }
        return 0;
    }

    function drawImgHold(){
        if(touchX > imgHold.x){
            if((moveX - imgHold.x) <= moveSpeed){
                imgHold.x = moveX;
            }else{
                imgHold.x += moveSpeed;
            }
        }else{
            if((imgHold.x - moveX) <= moveSpeed){
                imgHold.x=moveX;
            }
            else{
                imgHold.x -= moveSpeed;
            }
        }
        drawImg(imgHold);
    }

    function drawImg(t){
        ctx.drawImage(t.image,t.x,t.y,t.w,t.h);
    }

    function GetRandom(Min, Max){
        var Range = Max - Min;
        var Rand = Math.random();
        return Min + Rand * Range;
    }
    function GetRandomNum(Min, Max){
        var Range = Max - Min;
        var Rand = Math.random();
        return(Min + Math.round(Rand * Range));
    }
</script>

<script type="text/javascript">
    var count = 0;
    console.log(true ? "A类" : "B类");
    var drawTimesLimit = 3;
    var drawTotalLimit = 6;
    var playTimesLimit = 5;
    var playTotalLimit = 10;
    var totalCount = 0;
    var isLimitDraw = false;
    var isLimitPlay = false;
    var otherPlayerInfo = {};
    var showAwardList = false;
    var informNum = 0;
    var playerAwardList = [];
    var skillSupportType = 2;
    var skillName = HdGame.decodeHtml('凡科互动（点击了解）');
    var skillLink = HdGame.decodeUrl(HdGame.decodeHtml('http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMjM5MTk5MjI3OA%3D%3D%26mid%3D209854000%26idx%3D1%26sn%3D82241d924839270d3ea820ad2d56c01b%23wechat_redirect'));
    var gameType = 0;
    var rankShowNum = 100;
    var helpType = 1;
    var addDrawTime = 1;
    var remainHelpNum = 10;
    PlayInfo.initData(0,0,5,5,10,false);

    //改版前的联系兑奖提示语
    HdGame._awardLinkMsg = '获奖者需填写联系电话方可查看兑奖码兑奖';

    //游戏调用抽奖方法,平台上全部默认luckDraw
    HdGame._luckDrawFunc = luckDraw;
    if(!_manage){
        if(false){
            HdGame._luckDrawFunc = luckDrawZhuli;
        }else if(false){
            HdGame._luckDrawFunc = luckDrawZhuliNew;
        }
    }
    if(false){
        $('.bottomSkill').html("");
    }

    if(false){
        // $('#awardContactInfo').hide();
        // if(false){
            $('#awardContactInfo').remove();
        // }
    }

    //初始化弹出层参数
    HdGame.initChangePoup({
        rankUrl        : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=getRankList&aid=13331192&gameId=58&style=10&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc',
        awardUrl       : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=getGiftList&aid=13331192&style=10',
        getRegAwardUrl : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=getRegAwardList&aid=13331192&gameId=58&style=10&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc',
        openId         : 'oI_3MwcBSLmaxopJR2fbLpM-75Pc',
        gameId         : 58,
        mhaveScore     : (true && gameType != 3),
        informUrl      : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=setInformNum&aid=13331192&gameId=58&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc',
        hasReport      : false,
        afterWxCard    : true
    });
    HdGame.resulePoup.init({
        drawType  : 1,
        checkRegUrl:'//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=checkRegNum&aid=13331192&gameId=58&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc',  
        regUrl    : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=setPlayerReg&aid=13331192&gameId=58&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc&flag1=true',
        home      : typeof home !== 'undefined' ? home : null,
        again     : typeof gameRestart !== 'undefined' ? gameRestart : null,
        giftInit  : HdGame._luckDrawFunc,
    });
   HdGame.initJsFoot({"rulesortstr":"abce","drawType":1,"hostName":"","hostLink":"http://m.stjscz.com","menuLink":"http://13331192.h40.faiusr.com/2/58/ACgIABACGAAg_ZWcxwUoufmCxAIw2AI42AI.jpg","fromFav":"","openAwardExp":true,"isHideFxts":true,"supportUrl":"http://m.stjscz.com","isAdverQRCode":false,"skillSupport":"","showJoinNum":true,"showRedDot":false,"showMDRedDot":false,"showAwardBtn":false,"isSelAwardLine":false,"showSkillSup":true,"menuStyle":3,"soundIcon_l":"0.75rem","soundIcon_t":"1rem","awardImage":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/gift.png","titleImg_path_def":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/title.png","startImg_path_def":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/startBtn.png","awardIconImgPath_def":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/ruleImg_red.png","titleImg_w_def":"13.3rem","titleImg_h_def":"8.8rem","startBtn_w_def":"8.3rem","startBtn_h_def":"2.5rem","logoImg_w_def":"2rem","logoImg_h_def":"2rem","awardImg_w_def":"6rem","awardImg_h_def":"6rem","homeBgPath_def":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/homeBg.jpg","gameBg2Path_def":"","gameBgPath_def":"http://saohuodazuozhan.oss-cn-hangzhou.aliyuncs.com/image/tdhx/gameBg.jpg","headImg2":"","headImg3":"","headImg4":"","dangerType":1,"isZhuLi":false,"getRegAwardUrl":"http://13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=getRegAwardList&aid=13331192&gameId=58&style=10&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc"})

    //标题与开始按钮动画
    function startBtnDelay(){
 
        $('.titleImg').removeClass('titleDown').addClass('titleDown');
        $('#startBtnImg').removeClass('startTada');
        
 
        hg.sound.pauseAll();
        
        setTimeout(function(){
            $('#startBtnImg').addClass('startTada');
        },1000); 
        
    }
    //抽奖结果页或收藏卡劵的显示兑奖详细页
    function showAwardDetail4Draw(fromFav){
        HdGame.changePoup(3,'',true);
        home('showAward',fromFav);
        if(g_config.isYKY){
            $('#poupInfoBox').show();
        }
    }

    function setAwardImgHeight(){
        $('#resule-gift-foot').css("margin-top",($('#resule-gift-sucImg').height()+35)/g_rem + 'rem');
    }
    function showRank(){
        HdGame.changePoup(1,'',true);
        $('#awardDetailBox').hide();
    }
    function showRule(isAnimation){
        $('#activityKit').hide();
        if(g_config.withAwardFinish){
            HdGame.changePoup(2,'',true);
        }else{
            HdGame.changePoup(2,'',isAnimation);
        } 
        $('#awardDetailBox').hide();
    }
    
    
    function activateSound(){ //兼容ios下 WebAudio类型的对象无法自动播放，必须在点击事件中播放过一次，才允许播放
        try{
            if(HdGame.isIPhone() && hg.sound.list && hg.sound.list.length > 0 && !hg.sound._activate){ 
                $.each(hg.sound.list, function(i, val) {
                    var data = hg.sound.cache[i];
                    if(i > 0 && data && data.soundType == "LWebAudio"){
                        data.play();
                        data.stop();
                    }
                });
                hg.sound._activate = true;
            }
        }catch(e){
            HdGame.logStd("activateSoundErr",e);
        }
    }
    function startBtnAjax(event,data,callBack,pass){
HdGame.tlog("startBtnAjax","true"); 
try {       
        var that = this;
        if(!pass){
            activateSound();
            //是否可参与地区
            if(g_config.isOpenAreaLimit){
                return HdGame.getAreaByWx(g_config.ipInfo,function(){
                    if( checkAreaLimit(g_config.ipInfo,g_config.areaLimitList) != 'ok' ){ //不在限制的地区内，直接返回
                        return rt(false);
                    }
                    return startBtnAjax.call(that,event,data,callBack,true);
                });
            }
        }

        //是否在活动时间内
        if(false){
            HdGame.statusMsg(0);
            hg.sound.allowPlay = false;
            hg.sound.pauseAll();
            return rt(false);
        }
        if(!hg.fireWith('startGamehead',that,[event,data])){
            return rt(false);
        }
        //是否超过参与人数
        if(false){
            if(false || false){//报名型游戏
                HdGame.statusMsg("本活动报名人数已达到最大限制如需继续参与，请与主办方联系。");
            }else{
                HdGame.statusMsg("本活动参与人数已达到最大限制如需继续参与，请与主办方联系。");
            }
            return rt(false);
        }

        

        //是否为黑名单
        if(false){
            HdGame.statusMsg('你有疑似作弊行为，已被列入黑名单','');
            return rt(false);
        }

        //是否强制关注,如果已经授权并且开启了强关注功能
        
        //是否联系信息,参与前填写联系信息
        
        if(g_config.afterLinkModify && HdGame.shouldRegInfo(2,arguments,this)){
            return rt(false);
        }
        
        //是否有参与机会
        if( gameType == 3 && g_config.isCheckPlayTimes && PlayInfo.getTotalRemainTimes() <= 0 ){
            HdGame.statusMsg(8);
            return rt(false);
        }
        if( gameType == 3 && g_config.isCheckPlayTimes && PlayInfo.getTodayRemainTimes() <= 0 ){
            HdGame.statusMsg(7);
            return rt(false);
        }
        
        if(!hg.fireWith('beforeStartGame',that,[false,event,data])){
            return rt(false);
        }
        hg.showGameBox && showGame();
        console.log("showGameBox: "+hg.showGameBox);
        HdGame.logDog(1000002, 10);
        HdGame.logDog(1000179, g_config.authVer + 1);
        HdGame.logObjDog(1000092, 1, 58);
        
            HdGame.addJoinGameBehavior();
        
        HdGame.setCookie('gps_province',HdGame.encodeUrl(g_config.ipInfo.provice),1);
        HdGame.setCookie('gps_city', HdGame.encodeUrl(g_config.ipInfo.city),1);
        HdGame.setCookie('fromCanal', HdGame.encodeUrl(fromCanal),1);
        var cookOpt = {};
        cookOpt.domain=HdGame.gameDomain;
        cookOpt.expires=1;
        cookOpt.path="/";
        $.cookie('gps_province',HdGame.encodeUrl(g_config.ipInfo.provice),cookOpt);
        $.cookie('gps_city',HdGame.encodeUrl(g_config.ipInfo.city),cookOpt);
        hg.fireWith('startGame',that,[false,event,data,showGame]);
        return rt(true);
        function rt(r){
            callBack && callBack.call(that,r,event,data,showGame);
            return r;
        }
        function showGame(){
            $('.homeBtnBox,.bottomSkill').hide();
            $('.footerBox').hide(); 
            $('.home,#ruleImg').hide();
            $('.gameBox').show();
            if(typeof hg.sound.cache[0] !== 'undefined' && typeof hg.sound.cache[0].playing !== 'undefined' && !hg.sound.cache[0].playing && g_config.style != 48 && g_config.style != 49 && g_config.style != 69){
                hg.sound.readyPlay(0,0,'loop');
            }
        }}catch(e) {
    HdGame.tlog("startBtnAjax",e);
    }
    }

        
    function gameOver(_gameScore,callBack,option,showAjaxBar){
        
        if(_gameScore === 'fail'){          
            setTimeout(function(){
                HdGame.resulePoup.show({
                    isSuc:false,
                    gameScore:"fail",//闯关失败
                    minScore:80,
                    bestScore:'无',
                    isReg:HdGame.isReg, //是否报名
                    gameType:gameType,
                    rank:0,
                    count:drawTimesLimit-count<0 ? 0:(drawTimesLimit-count),
                    isLimitDrawTotal:isLimitDraw,
                    totalCount: drawTotalLimit - totalCount < 0 ? 0 : (drawTotalLimit - totalCount)
                });
            },900);
            return;
        }
        if(isNaN(_gameScore) || _gameScore < 0){
            _gameScore = 0;
        }
        //参与前填写
        if(false){//奥运男篮游戏没有开始按钮，点击支持直接调gameOver;
            if(g_config.afterLinkModify && HdGame.shouldRegInfo(2,arguments,this)){
                return;
            }       
        }else{
            //其他游戏报名型没有参与后填写设置项,这里判断不等于报名型防止旧数据在这里触发联系兑奖
            var infoType = 1;
            if(gameType == 3 || gameType == 1){
                infoType = 3;
            }
            if(gameType != 1 && HdGame.shouldRegInfo(infoType,arguments,this)){
                return;
            }
        }
        $('.resuleBox').show();return false;
        $('.ajaxLoadBar').addClass('ajaxLoad');
        HdGame.showLoadToast('数据加载中');
        var _gameScoreStr = _gameScore + '';
        if(false){
            _gameScoreStr = changeTwoDecimal_f(_gameScore);
        }      
        var info = {headImg : "http://wx.qlogo.cn/mmopen/vi_32/S0mDvTpQxAemDgxCF2hlJTBhWwDlJd2nZhxb5ia7wqDZnB8RgCYsut6djiaNbj2Jy1FCnbW3zmmz4QdzgC5rBicsg/0"};
        g_config.awardUsername && (info.ausername = g_config.awardUsername);    
        g_config.awardPhone && (info.aphone = g_config.awardPhone); 
        g_config.awardAddress && (info.aadress = g_config.awardAddress);
        info.ip = '106.39.148.7';
        var params = {};
        params.gameId = 58;
        params.style = 10;
        params.achieve = HdGame.encodeBase64('"'+_gameScoreStr+'"') + "Y23zEj0iRzazUD3lFmblVDMjBjMzYGO";
        params.openId = "oI_3MwcBSLmaxopJR2fbLpM-75Pc";
        params.name = g_config.userName;
        
        params.info = $.toJSON(info);
        params.awardInfoB = g_config.awardInfoB;
        params.city_gps =  typeof g_config.ipInfo.city != 'undefined' ? g_config.ipInfo.city : '';;
        params.province_gps =typeof g_config.ipInfo.provice != 'undefined' ? g_config.ipInfo.provice : '';;
        if(false){
            params.fromPlayer = "";
        }
        
        $.extend(params,option);

        $.ajax({
            type : 'post',
            url : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=setAchieve&aid=13331192&playerId='+g_config.playerId,
            data : params,
            error : function(){            
                HdGame.hideLoadToast();
                HdGame.otherAjaxComplete();
                $('#timeUpImg,.timeUpImg').removeClass('tada');
                var rt = {
                    rt:-999,
                    msg:"ajax返回错误"
                };
                callBack && callBack(rt,rt);
                HdGame.tlog('gameOverErr',$.toJSON(arguments)); 
            },
            success : function(data){
                HdGame.hideLoadToast();
                HdGame.tlog('gameOver',data);                 
                var r = $.parseJSON(data);
                var isShowPoup = true;
                if(!showAjaxBar){
                    HdGame.otherAjaxComplete(); 
                }
                
                if(r.rt == 0){
                    var arg={
                        isSuc:r.isSuc,
                        gameScore:_gameScoreStr,
                        minScore:80,
                        bestScore:r.score,
                        isReg:HdGame.isReg, //是否报名
                        gameType:gameType,
                        rank:r.rank,
                        beat:r.beat,
                        count:drawTimesLimit-count<0 ? 0:(drawTimesLimit-count),
                        isLimitDrawTotal:isLimitDraw,
                        totalCount: drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount),
                        isEqualDraw:false
                    };
                    setTimeout(function(){
                        var callBackArg = {rt:r.rt,msg:r.msg,arg:arg,pId:r.playerId,firstScore : r.firstScore};
                        g_config.playerId = r.playerId;
                        if(false){
                            callBackArg.infoList = r.infoList;
                        }
                        callBack && (isShowPoup = callBack(callBackArg,r));
                        $('#timeUpImg,.timeUpImg').removeClass('tada');
                        isShowPoup !== false && HdGame.resulePoup.show(arg);
                    },300);
                    PlayInfo.addPlayTimes(1);
                }else if(r.rt == 11){
                    alert("已被检测到有作弊行为，再次被检测将永久禁止参与本游戏！");
                }else if(r.rt == 12){
                    alert("由于作弊行为，该微信号已永久禁止参与本游戏！");
                }else if(r.rt == 23){
                    HdGame.statusMsg(3);
                }else{
                    callBack && (isShowPoup = callBack({rt:r.rt,msg:r.msg},r));
                    isShowPoup !== false && HdGame.resulePoup.show({
                        isSuc:false,
                        gameScore:'--',
                        minScore:80,
                        bestScore:'--',
                        isReg:HdGame.isReg, //是否报名
                        gameType:gameType,
                        rank:'--',
                        beat:'--',
                        count:drawTimesLimit-count<0 ? 0:(drawTimesLimit-count),
                        isLimitDrawTotal:isLimitDraw,
                        totalCount: drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount),
                        isEqualDraw:false
                    });
                    return;
                }
                if(r.rt !== 0){
                    callBack && callBack({rt:r.rt,msg:r.msg},r);
                }
            }
        });
        params = info = option = null;
        function changeTwoDecimal_f(x) {
            var f_x = parseFloat(x);
            if (isNaN(f_x)) {
                alert('function:changeTwoDecimal arguments error');
                return x;
            }
            var f_x = Math.round(x * 100) / 100;
            var s_x = f_x.toString();
            var pos_decimal = s_x.indexOf('.');
            if (pos_decimal < 0) {
                pos_decimal = s_x.length;
                s_x += '.';
            }
            while (s_x.length <= pos_decimal + 2) {
                s_x += '0';
            }
            return s_x;
        }
        
    }

function checkAreaLimit(ipInfo,areaLimitList,isShowMsg){
    isShowMsg = isShowMsg !== false;
    //限制参与地区
    var now_province = ipInfo.provice;
    var now_city = ipInfo.city;
    if(areaLimitList.length > 0){
        if( now_province && now_city ){ //有当前地理位置信息
            var isLimit = true;
            for(var i = 0; i < areaLimitList.length; i++){
                var info = site_cityUtil.getInfo(areaLimitList[i]);
                if(info.parentId == 1){
                    if(info.name.indexOf(now_province) > -1 || now_province.indexOf(info.name) > -1){
                        isLimit = false;
                        break;
                    }
                }else{
                    if(info.name.indexOf(now_city) > -1 || now_city.indexOf(info.name) > -1){
                        isLimit = false;
                        break;
                    }
                }
            }

            if(isLimit){
                isShowMsg && HdGame.statusMsg('您当前所在的地区（' + now_city + '）不在可参与区域范围','');
                return 'limit';
            }
        }else{ //没有查到当前ip信息，显示服务繁忙
            isShowMsg && HdGame.statusMsg("服务繁忙，请稍候重试",'');
            return 'busyness';
        }
    }
    return 'ok';
} 

hg.on('beforeDraw',function(_arguments){
    // $.ajax({
        // type : 'post',
        // url : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=getLinkInfoType&gameId=58',
        // error : function(){            
            // alert( '服务繁忙，请稍候重试!' );
            // HdGame.otherAjaxComplete();          
        // },
        // success : function(data){
            // var result = $.parseJSON(data);
            // console.log(result);
            // g_config.linkInfoType = result.linkInfoType;
        // }
    // });
    /*
    console.log(startStatus);
    
    */
    var thisInfoType = 2;
    if(g_config.afterLinkModify && HdGame.shouldRegInfo(thisInfoType,_arguments,this)){
        
        return false;
    }
    //抽奖前填写联系信息
    thisInfoType = 3;
    if(g_config.afterLinkModify && HdGame.shouldRegInfo(thisInfoType,_arguments,this)){
        
        return false;
    }
});

var drawStatusLuckDraw = true;
function luckDraw(fn,option,pass){

    if(g_config.isOpenAreaLimit && !pass){
        HdGame.getAreaByWx(g_config.ipInfo,function(){
            //限制参与地区
            if( checkAreaLimit(g_config.ipInfo,g_config.areaLimitList) != 'ok' ){ //不在限制的地区内，直接返回
                return false;
            }
            luckDraw(fn,option,true);
        });
        return false;
    }
    
    if(hg.fireWith('beforeDraw',this,[arguments]) === false){
        return false;
    }
    
    if(!drawStatusLuckDraw){
        return;
    }

    //显示数据加载中
    
    HdGame.showLoadToast('数据加载中');
    
    drawStatusLuckDraw=false;
    $('.ajaxLoadBg').show();
    $('.ajaxLoadBar').addClass('ajaxLoad'); 

    var params = {};
    params.gameId = 58;
    params.style = 10;
    
    params.userName = g_config.userName;
    params.isPub = $.trim('1');
    params.headImg = g_config.headImg;
    params.ip = '106.39.148.7';
    params.city_gps = typeof g_config.ipInfo.city != 'undefined' ? g_config.ipInfo.city : '';;
    params.provice_gps = typeof g_config.ipInfo.provice != 'undefined' ? g_config.ipInfo.provice : '';;
    if(false){
        params.fromPlayer = "";
    }
    $.extend(params,option);
    $.ajax({
        type : 'post',
        url : '//13331192-58.hd.webportal.cc/ajax/hdgame_h.jsp?cmd=getResult&aid=13331192&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc',
        data : params,
        error : function(){ 
            HdGame.hideLoadToast();
            HdGame.otherAjaxComplete();
            drawStatusLuckDraw=true;
            if(gameType != 4){
                count++;
                totalCount++;
            } 
            clearTimeout(HdGame.lotTimer);
            hg.fireWith('afterDraw',this,[{
                success : false,
                rt : -999,
                msg : '服务繁忙，请稍候重试',
            }]);        
        },
        success : function(data){
            HdGame.hideLoadToast(); 
            HdGame.tlog('luckDraw',data);
            HdGame.otherAjaxComplete(); 
            drawStatusLuckDraw=true;  
            clearTimeout(HdGame.lotTimer);
            var result = $.parseJSON(data);
            hg.fireWith('afterDraw',this,[result]);
            
            if(result.success){
                if(gameType != 4){
                    count++;
                    $(".dayDrawCount").text(drawTimesLimit-count<0 ? 0:(drawTimesLimit-count));
                    totalCount++;
                    $(".totalDrawCount").text(drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount));
                }   
                $('#resule-gift-box').attr('_level',result.awardIndex);
                g_config.haveAward = true;
                $('.resule-status-send').html("查看我的奖品");
            }else{
                if(result.rt === 27 && result.op === "getGameResult"){
                    $('.resuleBox').hide();
                    HdGame.showLotsWait(5,function(){
                        $('.resuleBox').show();
                        //HdGame.resulePoup.startStatus = true; //开启摇一摇抽奖
                        luckDraw(fn,option);
                    });
                    return;
                }else if (result.rt === 1) {
                    count = drawTimesLimit;
                    $(".dayDrawCount").text(0);
                    HdGame.statusMsg(4);
                    if(!g_config.showHelpGuide){
                        $('#resule-gift-box').hide();
                    }
                    home('luckDraw');
                    return;
                }else if (result.rt === 13) {
                    HdGame.statusMsg(6);
                    count = drawTimesLimit;
                    totalCount = drawTotalLimit;
                    $(".dayDrawCount").text(0);
                    $(".totalDrawCount").text(0);
                    $('#resule-gift-box').hide();
                    home('luckDraw');
                    return;
                }else if( result.rt ===  -3 ){
                    HdGame.statusMsg("活动不存在。");
                    return;
                }else if( result.rt ===  23 ){
                    HdGame.statusMsg("游戏已结束。");
                    return;
                }else{  
                    if(result.rt === -2){
                        HdGame.log("参数错误。");
                    }else if(result.rt === -1){
                        HdGame.log("系统错误，请刷新再试。");
                    }
                    count++;
                    $(".dayDrawCount").text(drawTimesLimit-count<0 ? 0:(drawTimesLimit-count));
                    totalCount++;
                    $(".totalDrawCount").text(drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount));
                    $('.resule-status-box').hide();
                }
            }
            var arg={
                isSuc:result.success,
                giftStyle:result.awardStyle,
                giftName:result.awardName,
                giftCode:result.awardCode,
                awardTypeNum:result.awardTypeNum,
                giftImage:result.awardImage,
                awardImageW:result.awardImageW,
                awardImageH:result.awardImageH,
                awardIndex:result.awardIndex,
            };
            if(HdGame.getType(fn) === 'function'){
                fn(arg,result);
            }else{
                HdGame.resulePoup.showGift(arg);
            }
        }
    });     

}
function luckDrawZhuliNew(fn,option){
    if(!drawStatusLuckDraw || _manage){
        return;
    }

    //显示数据加载中
    HdGame.showLoadToast('数据加载中');
    drawStatusLuckDraw=false;
    $('.ajaxLoadBg').show();
    $('.ajaxLoadBar').addClass('ajaxLoad'); 
    var params = new Array();
    params.push("gameId=",58);
    params.push("&zlid=",g_config.style == 61 ? zlid : -1);
    params.city_gps = typeof g_config.ipInfo.city != 'undefined' ? g_config.ipInfo.city : '';;
    params.province_gps = typeof g_config.ipInfo.provice != 'undefined' ? g_config.ipInfo.provice : '';;
    $.extend(params,option);
    $.ajax({                
        type : 'post',
        url : '//13331192-58.hd.webportal.cc/ajax/hdzhuli_h.jsp?cmd=getResult&aid=13331192&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc',
        data : params.join(''),
        error : function(err,errObj){ 
            if(m_debug){
                alert( '服务繁忙，请稍候重试' ); 
            }
            HdGame.hideLoadToast();
            HdGame.otherAjaxComplete();
            drawStatusLuckDraw=true;
        },
        success : function(data){
            HdGame.hideLoadToast();
            HdGame.tlog('luckDrawZhuliNew',data);
            HdGame.otherAjaxComplete();     
            drawStatusLuckDraw=true;
            var result = $.parseJSON(data);
            setNoLiheWxShare && setNoLiheWxShare();
            if(result.success){
                var arg={
                    isSuc:result.success,
                    giftStyle:result.awardStyle,
                    giftName:result.awardName,
                    giftCode:result.awardCode,
                    giftImage:result.awardImage,
                    awardImageW:result.awardImageW,
                    awardImageH:result.awardImageH,
                    awardIndex:result.awardIndex,
                };
                g_config.haveAward = true;

                if(HdGame.getType(fn) === 'function'){
                    fn(arg,result);
                }else{
                    HdGame.resulePoup.show(arg);
                }
                
            }else{
                if( result.rt === 8 || result.rt === 23 ){
                    HdGame.statusMsg(result.msg);
                    return;
                }else{  
                    var arg={
                        isSuc:result.success
                    };
                    if(HdGame.getType(fn) === 'function'){
                        fn(arg,result);
                    }else{
                        HdGame.resulePoup.show(arg);
                    }
                }                   
            }
        }
    });
}
$(function(){
    if(_manage){
        $("#resule-gift-sucImg").parent().append('<span class="hd-left-arrow theArrowSpan hide"></span><span class="hd-right-arrow theArrowSpan hide"></span>');
    }
    HdGame.imgReady("",function(){
        var originSize = {width:$("#ruleImg").width(),height:$("#ruleImg").height()};
        var nowSize = HdGame.Img.calcSize(this.width,this.height,originSize.width,originSize.height,HdGame.Img.MODE_SCALE_DEFLATE_FILL);
        $("#ruleImg").css({
            "background-size": nowSize.width+"px "+nowSize.height+"px",
            "background-image":"url("+""+")",
        }).attr("_src","");
    })
    hg.fire('jsFootEnd');
    console.log("abcccc");
    
})
</script>


<script type="text/javascript">
    
    $.ajaxSettings.errorCall.push(function(callbackContext, status, error){
        if(/logAjaxErr_h\.jsp/.test(callbackContext.url) && /cmd=hdajaxErr/.test(callbackContext.url)){
            return;
        }
        var faiAjax = Fai.top._faiAjax || $;
        if( faiAjax ){
            faiAjax.ajax({
                type    : "post",
                url     : "http://13331192-58.hd.webportal.cc/ajax/logAjaxErr_h.jsp?cmd=hdajaxErr&error="+error+"&status="+status+"&openId=oI_3MwcBSLmaxopJR2fbLpM-75Pc&aid=13331192&gameId=58",
                data    : 'msg=' + HdGame.encodeHtml('ajaxUrl='+HdGame.encodeUrl(callbackContext.url)+';refer='+HdGame.encodeUrl(Fai.top.location.href))
            });
        }
    });
    
</script>
</body>
</html>